Advertisement
CaffeLatte

AFFARI MIEI

May 29th, 2015
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.21 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Threading;
  7.  
  8. namespace Quiz
  9. {
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             Random caso = new Random();
  15.             int risposta;
  16.             Console.WriteLine("\nBenvenuto nel super Quiz!");
  17.             int inizio;
  18.             int tentativi = 0;
  19.             do
  20.             {
  21.                 Console.WriteLine("\nsei pronto? \n1 - si \n2 - no");
  22.                 inizio = Convert.ToInt32(Console.ReadLine());
  23.  
  24.             } while (inizio > 2);
  25.             if (inizio == 2)
  26.             {
  27.                 System.Environment.Exit(1);
  28.             }
  29.             else
  30.             {
  31.                 int qualsiasi = caso.Next(1, 21);
  32.                 switch (qualsiasi)
  33.                 {
  34.                     case 1:
  35.                         Console.Write("Da dove viene la parola dicesi? \n1 - Dalla mia bocca \n2 - Dal lavandino di mia zia \n3 - Dal dizionario \n4 - Uso il 50 e 50");
  36.                         risposta = Convert.ToInt32(Console.ReadLine());
  37.                         switch (risposta)
  38.                         {
  39.                             case 1:
  40.                                 tentativi = tentativi++;
  41.                                 Console.WriteLine("Mmmmm... NO hahahaha! \n Hai perso al" + tentativi + "° tentativo!");
  42.                                 Thread.Sleep(4000);
  43.                                 Console.Clear();
  44.                                 Console.WriteLine("Vuoi riprovare? \n1- si \n2 - no");
  45.                                 int errore = Convert.ToInt32(Console.ReadLine());
  46.                                 if (errore == 2)
  47.                                 {
  48.                                     System.Environment.Exit(1);
  49.                                 }
  50.                                 else
  51.                                 {
  52.                                     "deve tornare a int qualsiasi" ;
  53.                                 }
  54.  
  55.                         }
  56.                         break;
  57.                 }
  58.             }
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.             Console.ReadKey();
  78.         }
  79.     }
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement