- #1
- 371
- 0
I want the user to enter a number from 1 to 9, then check its in that range and a number.
This is the code I have, but its not working.
Any Suggestions?
This is the code I have, but its not working.
Code:
int NumPlayers = 0;
do
{
cout << "Please enter a interger from 1 to 9." << endl;
cin >> NumPlayers;
}
while(isdigit(NumPlayers) && (1 <= NumPlayers <= 9));
Any Suggestions?