using System;
public class Program
{
public static void Main()
Random NumGen = new Random(); //Creates a random number generator variable
//Declaring two variables
int NumberOfAttempts = 0;
int Attempt = 0;
//do {
//} while (condition);
// Do while does the thing and then loops if the condition is met
while (Attempt != 6) { //Loop parameters
Attempt = NumGen.Next(1, 7); //Chooses a random number between 1 and 6 (the first number counts the number typed while the second doesn't
Console.WriteLine("Tom rolled; " + Attempt + ".");
NumberOfAttempts++;
}
Console.WriteLine("It took Tom " + NumberOfAttempts + " attempts to roll a six.");