Just receive numbers (0-9) as input.
I tried something like that:
Code:
//Receive the max questions of the game
//Receive the max questions of the game
do {
printf("\nHow Many questions at all game? (I.E: 10)\n");
scanf("%d",&max_questions); } while(isdigit(max_questions) != 0);
But he receives letters too, and this causes a big problem on my App, whats wrong here?
I dont know too much about isdigit(), I think he return 1+ when is just numbers and 0 when its an char, right?
Someone can help? this seems to be easy for those who knows :)
Thanks!!!!
I didnt understood you too much..
I want to use isdigit(), I think the problem is that I need to send an char for isdigit instead int, right?
or maybe because I didnt wrote well the do...while loop.