Thursday, August 5, 2021

C++ Program to find greater number among three variable using logical operator

C++ Program to find greater number among three variable using logical operator

#include<iostream.h>

#include<conio.h>

void main()

{

 int a,b,c;

 clrscr();

 cout<<"\nEnter First Number: ";

 cin>>a;

 cout<<"\nEnter Second Number: ";

 cin>>a;

 cout<<"\nEnter Third Number: ";

 cin>>a;

 

  if(a>b && a>c)

  {

   cout<<"\n a is greater";

  }

  else if(b>a && b>c)

  {

   cout<<"\n b is greater";

  }

  else

  {

   cout<<"\n c is greater";

  }

 getch();

}

   

No comments:

Post a Comment

Computer Network & Computer Features | Bal Varg | Computer Questions List!

  Computer Network & Computer Features 1) _______ is a thin strip like bar present at the bottom of the screen.   Taskbar 2) _______ ser...