std::cout << "Enter the first number: "; std::cin >> num1; std::cout << "Enter the second number: "; std::cin >> num2; if (num1 > num2) { std::cout << "The maximum number is: " << num1 << std::endl; std::cout << "The minimum number is: " << num2 << std::endl; } else { std::cout << "The maximum number is: " << num2 << std::endl; std::cout << "The minimum number is: " << num1 << std::endl; } return 0;
int main() {
std::cout << "Enter the first number: ";int num1, num2;
std::cin >> num1;
std::cout << "Enter the second number: ";
std::cin >> num2;
if (num1 > num2) {
std::cout << "The maximum number is: " << num1 << std::endl;
std::cout << "The minimum number is: " << num2 << std::endl;
} else {
std::cout << "The maximum number is: " << num2 << std::endl;
std::cout << "The minimum number is: " << num1 << std::endl;
}
return 0;
}