Untitled
public text v1 · immutable#include <iostream.h>
#include <H:\lvp\random.h>
int main()
{
randomize();
int rolls;
cout << "How many rolls do you want to simulate? ";
cin >> rolls;
cout << endl;
for (rolls; rolls--;)
cout << random(6) + 1 << " " << random(6) + 1 << endl;
cout << endl;
if ((random(6) + 1) == (random(6) + 1)) {
cout << "There was at least one double.";
}
else {
cout << "There were no doubles.";
}
cout << endl;
return(0);
}