Im having trouble with a C++ assignment. I need to write a program like this: Write a program that displays fice rolls of two dice where each die is a number from 1 to 6, and shows the total. when run the programs output should look somewhat like this:
2 4= 6
1 1= 2
6 6= 12
4 3= 7
5 2= 7
ok i got the program to display the output but it dosent randomize differently every time i run it. It has to be in somesort of a loop. Heres what i got so far:
/*dice
2/18/03 */
#include <iostream.h>
#include <math.h> //Randomizer
int main()
{
int die
for (int roll= 1; roll<= 5; roll++)
double die=1+random(6)
cout<<die<<endl;
return(0);
}