Header Ads Widget

Responsive Advertisement

C++Program to find the greatest number between the three numbers...

//C++Program to find the greatest number between the three numbers...
#include < conio.h >
#include< iostream.h >
void main()
 {
  int num1,num2,num3;
  cout<<"\tEnter First Number= ";
  cin>>num1;
  cout<<"\tEnter Second Number= ";
  cin>>num2;
  cout<<"\tEnter Third Number= ";
  cin>>num3;
  if(num1>num2&&num1>num3)
    {
      cout<<"\n\tFirst Number= "<    }
  else if(num2>num1&&num2>=num3)
    {
      cout<<"\n\tSecond Number= "<    }
  else
    {
      cout<<"\n\tThird Number= "<    }
  getch();
 }



NB: \n - Gives vertical tab (It moves you to the next line).
      \t - Gives horizontal tab


Output:
http://inolearningsite.blogspot.com/
Output


Post a Comment

0 Comments