Advertisement
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;
- using System.Threading.Tasks;
- namespace ConsoleApplication56
- {
- class Program
- {
- static void Main(string[] args)
- {
- bool flag = true;
- while (flag)
- {
- Console.WriteLine("Please enter which di you would like to use");
- int dice = Convert.ToInt32(Console.ReadLine());
- if (dice == 4)
- {
- Console.WriteLine("You have chosen to use the 4 sided dice");
- Random rnd = new Random();
- int number = rnd.Next(1, 5);
- Console.WriteLine("Your number is " + number);
- }
- if (dice == 6)
- {
- Console.WriteLine("You have chosen to use the 6 sided dice");
- Random rnd = new Random();
- int number = rnd.Next(1, 7);
- Console.WriteLine("Your number is " + number);
- }
- if (dice == 12)
- {
- Console.WriteLine("You have chosen to use the 12 sided dice");
- Random rnd = new Random();
- int number = rnd.Next(1, 13);
- Console.WriteLine("Your number is " + number);
- }
- Console.WriteLine("Do you want to role again?");
- String decision = Console.ReadLine();
- if (decision == "yes")
- {
- flag = true;
- }
- else
- {
- flag = false;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement