C++ Beginners Tutorial 6 - If and Else Statements




#include <iostream>
using namespace std;
int main()
{
int age;
int height;
cout<<"Please enter the Age"<<endl;
cin>>age;
cout<<"Please enter the Height"<<endl;
cin>>height;

if(age==20 && height==100)
{
cout<<"The age and height entered is correct"<<endl;
}
else
{
cout<<"The age and height entered is not correct"<<endl;
}
return 0;
}

Comments