It looks like you're new here. If you want to get involved, click one of these buttons!
using System;
namespace Programming_Lesson_4
{
class Program
{
static void Main(string[] args)
{
Random numberGen = new Random();
int roll = 0;
int roll2 = 1;
int attempts = 0;
Console.WriteLine("Press enter to roll the dice:");
while(roll != roll2)
{
Console.ReadKey();
roll = numberGen.Next(1, 7);
roll2 = numberGen.Next(1,7);
Console.WriteLine("\nRoll 1: " + roll);
Console.WriteLine("Roll 2: " + roll2);
attempts++;
}
Console.WriteLine("It took you " + attempts + " attempts to roll twin numbers!");
Console.ReadKey();
}
}
}