All pastes #761883 Raw Edit

Untitled

public text v1 · immutable
·published 2007-11-05 03:25 UTC
rendered paste body
#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);
}