Help Please !!!!!!!!

This is a discussion on Help Please !!!!!!!! within the C++ Programming forums, part of the General Programming Boards category; I am on the second part of the Tutorial on cpprogramming.com
and i tried the age program
Code:
#include <iostream.h>
...

Help Please !!!!!!!!

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!!!!

You're program is working just fine, it's just that it displays its output and then exits so fast that you don't get a chance to read anything. Using system("pause") might work but a better alternative would probably be to put:

"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens

You're program is working just fine, it's just that it displays its output and then exits so fast that you don't get a chance to read anything. Using system("pause") might work but a better alternative would probably be to put:

#include <iostream> //use iostream not iostream.h
using namespace std;//include this so you will be able to use cout not std::cout
int main()
{
int num1,num2,answer;
cout<<"Please input a number to be multiplied: " << endl;
cin>>num1;
cout << "Please input a second number to be multiplied:" << endl;
cin >>num2;
answer=num1*num2;
cout<<"The product of your two numbers is " << answer << endl;
system("PAUSE");
cin.get();
return 0;
}

#include <iostream> //use iostream not iostream.h
using namespace std;//include this so you will be able to use cout not std::cout
int main()
{
int num1,num2,answer;
cout<<"Please input a number to be multiplied: " << endl;
cin>>num1;
cout << "Please input a second number to be multiplied:" << endl;
cin >>num2;
answer=num1*num2;
cout<<"The product of your two numbers is " << answer << endl;
system("PAUSE");
cin.get();
return 0;
}

Yours seem to work thanks
and i also made a Division version of that one .
^ i know its not that impressing but hey i started reading that tutorial today i didnt Know nothing about c++ before and i am only 15 years old and i am trying to absorb everything that is tought in that tutorial . THANKS again for all your help.