שפת C: הבדלים בין גרסאות בדף

תוכן שנמחק תוכן שנוסף
אין תקציר עריכה
אין תקציר עריכה
שורה 1:
private int n1;
using System;
private int n2;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
public Domino()
namespace ConsoleApplication37
{
class Program
{
staticRandom voidr Main(string[]= argsnew Random();
{this.n1 = r.Next(1, 7);
this.n2 = int[] re={r.Next(1,2,3,6,4,1,2} 7);
}
Console.WriteLine(rezef(re));
public int }GetN1()
{
public statc int rezef(int[] nums)
{return this.n1;
}
int counter = 1;
public int max = 1;GetN2()
{
for (int i = 0; i < nums.Length - 1; i++)
return {this.n2;
}
if (nums[i] <= nums[i + 1])
public override string ToString()
{
{
counter++;
return "N1: " + this.n1 + " N2: " + max = Maththis.Max(max, counter)n2;
}
else
counter = 1;
}
return max;
}
}
}