using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace sayisalLoto
{
class Program
{
static void Main(string[] args)
{
while (true)
{
int[] a = new int[6];
Random r = new Random();
a[0] = r.Next(1, 50);
for (int i = 1; i < 6; )
{
a[i] = r.Next(1, 49);
if (Array.IndexOf(a, a[i]) != -1)
i++;
//for (int j = 0; j < i; j++)
//{
// if (a[i] == a[j])
// i--;
//}
}
Array.Sort(a);
//for (int j = 0; j <= 5; j++)
// for (int i = 0; i <= 4; i++)
// {
// if (a[i] >= a[i + 1])
// {
// int k = a[i];
// a[i] = a[i + 1];
// a[i + 1] = k;
// }
// }
//for (int i = 0; i < 6; i++)
//{
// Console.Write(a[i] + " ");
//}
Console.WriteLine(a[0] + " " + a[1] + " " + a[2] + " " + a[3] + " " + a[4] + " " + a[5]);
Console.WriteLine("Çıkmak için->1, devam için->0");
string devam = Console.ReadLine();
if (devam == "1")
break;
}
}
}
}
