ENTER THREE NUMBER AND FIND THE LARGEST NUMBER BETWEEN ALL OF THEM

 #include<iostream>

using namespace std;

int

main ()

{

  int a, b, c, big;


  cout << " Enter your first number " << endl;

  cin >> a;

  cout << " Enter your second number " << endl;

  cin >> b;

  cout << " Enter your third number " << endl;

  cin >> c;

  if (a > b && a > c)

    {

      cout << "your largest number is " << endl;

      cout << a;

    }

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

    {

      cout << "your largest number is " << endl;

      cout << b;


    }

  else

    {

      cout << "your largest number is " << endl;

      cout << c;


    }



  return 0;

}


Comments

Popular posts from this blog

250+ C Programs for Practice

FUNCTION OVERRIDING IN CPP