
Maximum of 2 Number
By:
rabbinur on
Aug 1st, 2012 | syntax:
C++ | size: 0.38 KB | hits: 17 | expires: Never
#include"iostream.h" //used for cin>> & cout<<
#include"conio.h" //used for clrscr() & getch()
void main()
{
clrscr();
int a,b;
cout<<"Enter first number:";
cin>>a;
cout<<"Enter second number:";
cin>>b;
if(a==b)
{
cout<<"Equal";
}
else
{
if(a>b)
{
cout<<"Fist one is greater";
}
else
{
cout<<"Second one is greater";
}
}
getch();
}