#include <iostream>
using namespace std;
int main() {
float x, y;
cout << endl<<"Input first number: ";
cin >> x;
cout <<endl<< "Input second number: ";
cin >> y;
if(x>y)
cout << endl << "Result: "<<x;
else
cout << endl << "Result: "<<y;
}
Объяснение:
#include <iostream>
using namespace std;
int main() {
float x, y;
cout << endl<<"Input first number: ";
cin >> x;
cout <<endl<< "Input second number: ";
cin >> y;
if(x>y)
cout << endl << "Result: "<<x;
else
cout << endl << "Result: "<<y;
}
Объяснение: