Answer to Question #23977 in C++ for Nourh
2013-02-07T19:20:24-05:00
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.";
1
2013-02-11T11:39:33-0500
#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 !
Learn more about our help with Assignments:
C++
Comments
Leave a comment