How would I loop a switch statement until one of the valid options are entered.
would this work?
example:
// lets just say all the necessary starting code is already here....
int choice, number;
do
{
cout<<"please enter a number from 1-3\n";
cin>>number;
switch(number)
{
case 1:
break;
blah blah blah
}
while(number != 1 || number != 2 || number != 3 );
return 0;
}
Sorry if I confused someone with this I just need some help with looping a switch statement.