Rs-Gp-4U
2008-02-18 10:27:47
Hey guys i know this thread is alot similar to my last thread but i made another cin and it still closes.. ill explain more after this code..
In my last thread Wizzup? told me to put cin >> abc; in && i've did that but what happens is when i click run on Dev-C++ the exe program comes up "Bla bla whats ur age?" Then i type a random age && it closes.. Pls help
#include<iostream.h>
int main()
{
int myAge;
int yourAge;
int abc;
myAge = 14;
cout << "Hey im " << myAge " years old, how old are you?";
cin >> yourAge;
if (myAge > yourAge)
cout << "Yey im older than you!";
if (myAge < yourAge)
cout << "Ohh man im younger than you!";
if (myAge == yourAge)
cout << "Were the same age!";
cin >> abc;
}
In my last thread Wizzup? told me to put cin >> abc; in && i've did that but what happens is when i click run on Dev-C++ the exe program comes up "Bla bla whats ur age?" Then i type a random age && it closes.. Pls help