1. Home
  2. /
  3. Blog
  4. /
  5. c++ Program to find the largest of Three Numbers
C++

c++ Program to find the largest of Three Numbers

September 27, 2022 1 min read 3,546
c++ Program to find the largest of Three Numbers
#include <iostream>
using namespace std;

int main()
{
     int a, b, c, max;

     cout << " Enter Three Numbers : ";
     cin >> a >> b >> c;

     if((a > b) && (a > c))
     {
          max = a;
     }
     else if((b > a) && (b > c))
     {
          max = b;
     }
     else if((c > a) && (c > b))
     {
          max = c;
     }

     cout << " The LARGEST Number is = " << max;

}
Share:
Read next

Related articles