Hi when i make a simple c++ program: It closes too early it says please input your age, so i do then press enter and it closes itself i have used systempause("") and cin,get(); but it doesn't get further then my typing in my age?! Please can u help?
Oooh also i'm using the compiler 4.0 from www.bloodshed.netCode:#include <iostream.h> int main() //Most important part of the program! { int age; //Need a variable... cout<<"Please input your age: "; //Asks for age cin>>age; //The input is put in age if(age<100) //If the age is less than 100 { cout<<"You are pretty young!"; //Just to show it works } else if(age==100) //I use else just to show an example { cout<<"You are old"; //Just to show you it works... } else { cout<<"You are really old"; //Executed if no other statement is executed } cin,get(); return 0; }