Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main()
- {
- turn();
- Console.Read();
- }
- static int DiceThrow()
- {
- Random rnd = new Random();
- int rolled = rnd.Next(1, 7); //random number from 1 to 6
- return rolled;
- // return int.Parse(Console.ReadLine());
- }
- private static void turn()
- {
- for (int i = 0; i < 4; i++)
- {
- int numrolled = DiceThrow();
- Console.WriteLine(numrolled);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment