67 224
Assignments Done
99,2%
Successfully Done
In November 2018

Answer to Question #23977 in C++ for Nourh

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"); &
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions