and outputs the age but what i want it to check is if the user entered 0 or 100 i want it to output your kidding this is what i got ... but no matter what # i enter it still displays "your kidding"
#include <iostream>
#include <string>
usingnamespace std;
int main()
{
int age;
cout << "What is your age" <<endl;
cin >> age;
cout <<"I hear you just had a birthday and are: " << age <<endl;
if(age == 0 || 100)true;
{
cout << "Your Kidding" <<endl;
}
}
#include <iostream>
#include <string>
usingnamespace std;
int main()
{
int age;
cout << "What is your age" <<endl;
cin >> age;
if (age == 0 || age == 100)
{
cout << "Your kidding" << endl;
}
else
cout <<"I hear you just had a birthday and are: " << age <<endl;
system ("PAUSE");
}