1. الرئيسية
  2. /
  3. المدوّنة
  4. /
  5. c++ Program to find the largest of Three Numbers
سي بلس بلس

c++ Program to find the largest of Three Numbers

October 1, 2022 1 دقيقة قراءة 130
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;

}
شارك المقال:
اقرأ أيضاً

مقالات ذات صلة