rabbinur

Maximum of 2 Number

Aug 1st, 2012
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment