|
Windows 7, Visual Studio 2010, C++
int main()
{
float x,y;
do{
cout<<endl;
cout<<"Please enter a number greater than 3 and less than 9 ";cin>>x;
if(x<3 || x>9)
cout<<"ERROR"<<endl;
}while(x<3 || x>9);
more code for y....
***********************
Above code works fine for float x ; Want to trap error if x is ALPHA.
How???? (I haven't coded in a while)
|