C++ program – To check whether x is greather than y (IF statement)

by Nideesh C on May 7, 2011 · 0 comments

in C++




//Downloaded From theonlinetutorials.com
#include<iostream.h>
#include<conio.h>
void main()
{
int x,y;
cout<<" Enter values for x and y: ";
cin>>x>>y;
if (x>y)
cout<<"x is big";
if (y>x)
cout<<"y is big";
getch();
}

Output
Enter values for X and y : 10  20
y is big
Enter values for x and y : 20  10
x is big



Not Satisfied ? Just search & get the result

Related Posts Plugin for WordPress, Blogger...
Be Sociable, Share!

Related posts:

  1. Simple IF statement in C++
  2. C++ program – Check for Odd or Even
  3. if statement in C++
  4. Sample – Program to enter a sentence and output the number of uppercase & lowercase consonants, uppercase & lowercase vowels in sentence..
  5. C program to accept two integers and check if they are equal

Leave a Comment

Previous post:

Next post: