SHARE
TWEET

Untitled

a guest Jan 24th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             Console.WriteLine("--Yatzy--");
  2.             int antalKast = 6;
  3.             int i = 0;
  4.             Random slumpis = new Random();
  5.  
  6.  
  7.             while (i < antalKast)
  8.             {
  9.                 i = i + 1;
  10.                 int resultat = slumpis.Next(7);
  11.  
  12.                 if (resultat > i)
  13.                     Console.WriteLine("Tärning: "+ resultat);
  14.                    
  15.                    
  16.            
  17.  
  18.                 else
  19.  
  20.                     Console.WriteLine("Tärning: " + resultat);
  21.  
  22.  
  23.             }
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.             Console.ReadKey();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top