Program to input three numbers and print the largest of three
#include <iostream>
using namespace std;
int main()
{
int x,y,z;
cout << "Enter three NUMBER: "<< "\n";
cin >> x >> y >> z;
if(x>y && x>z)
cout << "\n" << x << " is greater";
if (y > x && y > z)
cout << "\n" << y << " is greater";
if (z > x && z > y)
cout << "\n" << z << " is greater";
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int x,y,z;
cout << "Enter three NUMBER: "<< "\n";
cin >> x >> y >> z;
if(x>y && x>z)
cout << "\n" << x << " is greater";
if (y > x && y > z)
cout << "\n" << y << " is greater";
if (z > x && z > y)
cout << "\n" << z << " is greater";
return 0;
}