Don't like ads? PRO users don't see any ads ;-)
Guest

Maximum of 2 Number

By: rabbinur on Aug 1st, 2012  |  syntax: C++  |  size: 0.38 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include"iostream.h" //used for cin>> & cout<<
  2. #include"conio.h" //used for clrscr() & getch()
  3. void main()
  4. {
  5.  clrscr();
  6.  int a,b;
  7.  cout<<"Enter first number:";
  8.  cin>>a;
  9.  cout<<"Enter second number:";
  10.  cin>>b;
  11.  if(a==b)
  12.  {
  13.   cout<<"Equal";
  14.  }
  15.  else
  16.  {
  17.   if(a>b)
  18.   {
  19.    cout<<"Fist one is greater";
  20.   }
  21.   else
  22.   {
  23.    cout<<"Second one is greater";
  24.   }
  25.  }
  26.  getch();
  27. }