1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace test
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Entrer votre chiffre:");
int numero1 = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("------ Vous avez choisi le numéro: " + numero1);
continuer();
générationencours();
générationnumgagnant();
continuer();
messagegénérationeffectué();
if (numero1 == loterie)
Console.WriteLine("Vous avez gagné le Jackpot !!!!!");
}
static void générationencours()
{
Console.WriteLine(".........................................");
Console.WriteLine(".......Génération du code gagnant........");
Console.WriteLine(".........................................");
}
static void générationnumgagnant()
{
int loterie = DateTime.Now.Millisecond;
Random numerogagant = new Random(loterie);
}
static void messagegénérationeffectué()
{
Console.WriteLine(".........................................");
Console.WriteLine(".....Le numéro gagnant a été généré......");
Console.WriteLine(".........................................");
}
static void continuer()
{
Console.WriteLine("Appuyer sur une touche pour <continuer>..");
Console.ReadKey();
}
}
} |
Partager