Sayısal Loto Oyunu c# kodları yapımı

C# Console programında hazırlanmış rastgele 6 tane sayı üretip ekranda gösteren sayısal loto programının kodları

Programın c# kodları:

using System;using 
System.Collections.Generic;using 
System.Linq;using System.Text;
namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            {
                Random rnd = new Random();
 
                int[] rastgelesayi = new int[6];
 
                for (int i = 0; i < 6; i++)
                {
 
                    rastgelesayi[i] = rnd.Next(1, 50);
 
                }
 
                Array.Sort(rastgelesayi);
 
                for (int i = 0; i < 6; i++)
                {
 
                    Console.Write(rastgelesayi[i] + " ");
 
                }
 
                Console.ReadLine();
            }
        }
     }
}
WordPress.com ile böyle bir site tasarlayın
Başlayın