Untitled

Anonymous
plain_text
09/12/2023 3:38 PM
700 B
40
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...