Originally Posted by
zonen
Ok so your saying that I have to use a loop instead of an if statement?
I am saying you should read the link I posted for you. As for input verification, you can do something like below. (Note: the tutorial covers all the information you need in order to understand loops and uses for them).
Code:
#include <iostream>
int main(void){
int score;
std::cout<<"Enter score given by judge(1-10):";
std::cin>>score;
while(score <=0 || score >= 10){
std::cout<<"You entered a incorrect value."<<std::endl;
std::cout<<"Enter score given by judge(1-10):";
std::cin>>score;
}
/*whatever else you are doing in your program. You can use
while loops like above for input verification.*/
return(0);
}