```cpp #include <iostream> using namespace std; int main() { int num1, num2; cin >> num1 >> num2; int max, min; if (num1 > num2) { max = num1; min = num2; } else if (num1 < num2) { max = num2; min = num1; } else { cout << "the two numbers are equal." << endl; return 0; } cout << "the larger number is " << max << ", the smaller number is " << min << "." << endl; return 0; } ``` [2024-10-10 23:03:21 | AI写代码神器 | 168点数解答]