Assuming the numbers are ints (no decimals). But I agree, there has to be another way.
Depending on what you want your code to do, I guess, you could do a while loop and a switch case. Not really less code, but fun anyway.
int cl=1, y;
cout<<"Enter y value: ";
case 303:cout<<"thank you.\n""Enter 1 to continue or any other number to quit.\n";
default: cout<<"Incorrect value, try again."<<endl;
cout<<"enter 1 to continue or any other number to quit.\n";
This post has been edited by OliveOyl3471: 23 August 2009 - 05:17 PM