Hi need to write a program that Given a method rollDice() which simulates rolling a dice by returning a random value between 1 and 6, write a condition for the while loop in the code below so that it will end after a double 6 has been rolled (i.e. both dice have the value 6):need youre help.
using System;
{
class Program;
{
int a = 0;
int b = 0;
while ( a==6; b==6)
{
a = rollDice();
b = rollDice();
Console.WriteLine("{0} {1}",a,b);
}
}
}
See Question&Answers more detail:os