Untitled
unknown
plain_text
2 years ago
523 B
26
Indexable
#include <iostream>
using namespace std;
int main() {
int so1, so2;
cout << "Nhập số nguyên thứ nhất: ";
cin >> so1;
cout << "Nhập số nguyên thứ hai: ";
cin >> so2;
int min, max;
if (so1 < so2) {
min = so1;
max = so2;
} else {
min = so2;
max = so1;
}
cout << "Giá trị nhỏ nhất là: " << min << endl;
cout << "Giá trị lớn nhất là: " << max << endl;
return 0;
}
Editor is loading...