Random rnd = new Random();
int[] tomb = new int[meret];
for (int i = 0; i < tomb.Length; i++ )
tomb[i] = rnd.Next(also, felso+1);
foreach (int szam in tomb)
Console.Write(szam + " \t" );
for (int i = 0; i < tomb.Length; i++)
Console.WriteLine("A páros számok darabszáma: " + darabszam);
Random rnd = new Random();
int[] tomb = new int[meret];
for (int i = 0; i < tomb.Length; i++)
tomb[i] = rnd.Next(also, felso + 1);
foreach (int szam in tomb)
Console.Write(szam + "\t" );
for (int i = 0; i < tomb.Length; i++)
if (tomb[i] < tomb[minind])
if (tomb[i] > tomb[maxind])
Console.WriteLine("A legkisebb elem: " + tomb[minind] + ", indexe: " + minind);
Console.WriteLine("A legnagyobb elem: " + tomb[maxind] + ", indexe: " + maxind);
using System.Globalization;
Random rnd = new Random();
int[] tomb = new int[meret];
for (int i = 0; i < tomb.Length; i++)
tomb[i] = rnd.Next(also, felso + 1);
foreach (int szam in tomb)
Console.Write(szam + "\t");
for (int i = 0; i < tomb.Length; i++)
int[] eredmenytomb = new int[darabszam];
foreach (int szam in tomb)
Console.WriteLine("5-tel oszthatóak: ");
foreach (int szam in eredmenytomb)
Console.Write(szam + " \t");