do{
cout << "Enter a value in the range of 5 to 10: " << endl;
cin >> num2;
if(num2 <= 5 && num2 >= 10)
cout << "This value is not in the proper range please try again" << endl;
}while(numValues2 > 1);
this is for an output that looks something like this
Enter a value in the range of 5 to 10: 4
This value is not in the proper range; please try again
Enter a value in the range of 5 to 10: 20
This value is not in the proper range; please try again
Enter a value in the range of 5 to 10: -6
This value is not in the proper range; please try again
Enter a value in the range of 5 to 10: 7
When I conpile and run this loop, it only goes through once. What seems to be the problem?
2007-03-26
14:19:59
·
3 answers
·
asked by
jkim972
3
in
Computers & Internet
➔ Programming & Design