Ok so I'm working my way through a c++ book and as a project on my own I wanted to write a program to simulate the roll of a die 10 times. The only problem is when I run the program it will only roll the same number 10 times. Example if the program rolls a 5 it will roll 10 5 in a row, and I don't know why.
Here is the code.
using namespace std;
int main ()
int count = 0;
count += 1;
if (count > 10)
int RandomNumber = rand();
int die =(RandomNumber % 6) + 1;
cout << "You rolled a " << die << endl;
int exit; // I added this just as a way of running the program
cin >> exit; // and having it close when I give it the ok