Объяснение:
var r = new Random();
int N=r.Next(10, 50_000_000);
var array=new int[N];
int counterForEvenNumbers = 0; //для четных
int counterForOddNumbers = 0; //для нечетных
for(int i=0; i<N;i++)
{
array[i]=r.Next(10, 50_000_000);
if(array[i]%2==0)
counterForEvenNumbers++;
else
counterForOddNumbers++;
}
Console.WriteLine("Нечетных - "+counterForOddNumbers+"; Четных - "+counterForEvenNumbers);
Объяснение:
var r = new Random();
int N=r.Next(10, 50_000_000);
var array=new int[N];
int counterForEvenNumbers = 0; //для четных
int counterForOddNumbers = 0; //для нечетных
for(int i=0; i<N;i++)
{
array[i]=r.Next(10, 50_000_000);
if(array[i]%2==0)
counterForEvenNumbers++;
else
counterForOddNumbers++;
}
Console.WriteLine("Нечетных - "+counterForOddNumbers+"; Четных - "+counterForEvenNumbers);