Tuesday, December 20, 2011

Find Greater between two numbers in C++


//Write a program to find greater between two numbers
#include <iostream.h>
#include <conio.h>
void main ()
{
int a,b;
clrscr ();
cout <<"Enter A: ";
cin >>a;
cout <<"Enter B: ";
cin >>b;
if (a>b)
{
cout <<"A is Greater";
}
else
{
cout <<"B is Greater";
}
getch ();
}

No comments:

Post a Comment