whenever the user of my program hits ENTER it shuts down. how should the user input their age without closing the program? (i am using bloodshed dev-C++ in case your wondering)
my code is:
#include <iostream.h>
using namespace std;
int main (int argc, char *argv)
{
int age;
cout << "please input your age:";
cin >> age;
if(age<100)
{
cout << "you are pretty young";
}
else if(age==100)
{
cout << "you are old";
}
else
{
cout << "you are really old";
}
return 0;
}



LinkBack URL
About LinkBacks


