if else condition
#include<iostream>
using namespace std;
int main()
{
int a,i=34;
cout<<"Enter an integer:";
cin>>a;
if(a<i)
{
cout<<"Your number is less";
}
else if(a==i)
{
cout<<"Your guessed the right number";
}
else{
cout<<"Your number is greater";
}
return 0;
}
Comments
Post a Comment