All pastes #761820 Raw Edit

Untitled

public text v1 · immutable
·published 2007-11-05 02:52 UTC
rendered paste body
#include <iostream.h>
#include <H:\lvp\random.h>

int main()
{
	int rolls;
	int n1, n2;
	   n1 = (random(6)) + 1;
       n2 = (random(6)) + 1;

	cout << "How many rolls do you want to simulate? ";
	cin >> rolls;
	cout << endl;
	
	for (rolls; rolls--;)
       cout << n1 << " " << n2 << endl;
	   cout << endl;

       if (n1 == n2) {
	      cout << "There were " << rolls << " doubles or " << "100%.";
	   }
      cout << endl;
	return(0);
}