Question #23977

Write code that simulates the roll of two dice. If the two dice have the same value, output the statement "Doubles. Roll again." Otherwise, print "Your turn is over.";

Expert's answer

#include<iostream>
using namespace std;
& bool f(int a){
if(a>-1 && a<101)
return true;
else
return false;

}
int main (){
int a=1,b=1;

while(a==b)
{
a =rand() % (6)+1;
b=rand() % (6)+1;
cout<<a<<" "<<b<<"\n";
}

&
system("PAUSE"); &
}
LATEST TUTORIALS
APPROVED BY CLIENTS