Categories: Uncategorized

C++ Program find the greatest number using nested if else

       

Result :

find the greatest number using nested if else



//find the greatest number using nested if else

#include<iostream>

using namespace std;

main()

{ 

 int a, b, c;

 

 cout << "This Program will Help you to find out greatest number amoung 3 numbers." << endl;

 

 cout << "Enter the 1st Value : ";

 cin >> a;

 

 cout << "Enter the 2nd Value : ";

 cin >> b;

 

 cout << "Enter the 3rd Value : ";

 cin >> c;



if(a >= b)

{

 if( a >= c)

 {

  cout << a << " : is greater than " << b << " and " << c;

 }

 else

 {

   cout << c << " : is greater than " << a << " and " << b;

 }

 

}

else

{

 if( b >= c)

 {

  cout <<  b << " : is greater than " << a << " and " << c;

 }

 else

 {

  cout <<  c << " : is greater than " << a << " and " << b;

 }

 

}



 

 return 0;

}
reecry

Recent Posts

Insta360 – Videos keep exporting backwards | Wrong side render in insta360

https://youtu.be/0RRUOIvmuWA I realized that I had my camera set up incorrectly, so when I upload…

6 months ago

Make Animated progress step bar using Figma

https://youtu.be/C3oFfV20K_c Make Animated progress step bar using Figma

7 months ago

How to Hide All Grids in Figma

https://youtu.be/o3pSH_oRzko How to Hide All Grids in Figma

7 months ago

How to Create Responsive Tool tip in figma

https://youtu.be/hdSUylKSsho How to Create Responsive Tool tip in Figma

7 months ago

Pixel Grid not visible in figma | How to Turn on figma Pixel Grid

https://youtu.be/AEiH7dSDhKo Having issue in figma pixel grid? learn how to show/ hide figma pixel grid…

7 months ago

Fix External Monitor Lag on Mac OS Ventura

https://youtu.be/iilYzHg9LwQ There are some issues going on in ventura OS its still in development phase…

1 year ago