cout << "Enter three numbers: "; cin >> a >> b >> c; if(a > b && a > c) { cout << "The largest number is: " << a << endl; } else if(b > a && b > c) { cout << "The largest number is: " << b << endl; } else { cout << "The largest number is: " << c << endl; } return 0;
using namespace std;
int main() {
cout << "Enter three numbers: ";int a, b, c;
cin >> a >> b >> c;
if(a > b && a > c) {
cout << "The largest number is: " << a << endl;
}
else if(b > a && b > c) {
cout << "The largest number is: " << b << endl;
}
else {
cout << "The largest number is: " << c << endl;
}
return 0;
}