Hey, i saw this thread about some one needing homework help but it was solved so i made one and it's not real homework but i was wondering how i could do something if the user entered a letter eg "e".
#include <iostream>
using namespace std;
int main()
{
int dollarAmmount;
cout << "Enter A Dollar Ammount Between $0 & $100" << endl;
cout << "$";
cin >> dollarAmmount;
if (dollarAmmount < 0)
cout << "ERROR : Dollar Ammount Is To Low.";
if (dollarAmmount > 100)
cout << "ERROR : Dollar Ammount Is To High.";
else
cout << "Thanks.";
system("PAUSE>nul");
}
Like.. to make it have a error like "ERROR : Input Is Not A Digit."