I am on the second part of the Tutorial on cpprogramming.com
and i tried the age program
Code:#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 if(age>100) { cout<<"You are really old"; //Proof that it works for any condition } return 0; }
I am using DEV-C++ Ver 4.9.9.1
and when ever i compile and run , a command screen pops up but when i enter the age and press ENTER it exits HELP please
nothing is working i even downloaded a chess game from one of the Threads but every time i try to run it , a black screen pops up and disappears really fast. HELP!!!!