I want it to say "You are correct!" when the number they guess matches the random roll but it just keeps saying this when I type in 6 as my guess, how do I fix it?
This is what I wrote in the main:
int num;
int die;
cout << "What number do you think you'll roll? " << endl;
cin >> num;
die=(int)(rand()%6)+1;
if (num<6 && num>0) {
srand((unsigned)time(0));
cout << die << endl;
}
else if (num==die) {
cout << "Congradulations! You predicted correctly. " << endl;
}
else if (num > 6) {
cout << "Number not on die" << endl;
}
system("PAUSE");
return(0);