345 ❤︎ Bài viết: 82 Tìm chủ đề
1308 37
P/S: Sử dụng hàm minmax trong thư viện <algorithm>

Written by Blog06's teacher

Pls report it to me if there is anything wrong!

Code c++ tính giá trị min, max:

C++:
#include <iostream>
#include <algorithm>

int main() {
    int a = 5, b = 10;

    int minValue = std::min(a, b);
    int maxValue = std::max(a, b);

    std::cout << "Min value: " << minValue << std::endl;
    std::cout << "Max value: " << maxValue << std::endl;

    return 0;
}
 
Last edited by a moderator:

Những người đang xem chủ đề này

Xu hướng nội dung

Back