Help with complex if statements
Code:
#include <iostream.h>
int main()
{
int myLook;
cout << "Rate my looks on a scale from 1 to 10\n";
cin >> myLook;
{
if (myLook == 1)
cout << "1\n";
if (myLook == 2)
cout << "2\n";
if (myLook == 3)
cout << "3\n";
if (myLook == 4)
cout << "4\n";
if (myLook == 5)
cout << "5\n";
if (myLook == 6)
cout << "6\n";
if (myLook == 7)
cout << "7\n";
if (myLook == 8)
cout << "8\n";
if (myLook == 9)
cout << "9\n";
if (myLook == 10)
cout << "10\n";
return 0;
}
}
uhh I basically want to make it so if you type in a number it will say something I have it set to say the number you type in right now, I want it so if you type in a number that is not between 1-10 that it says error or something, could someone give me some ideas or examples of what I could do to make this work the way I want it to?
Thanks