1307
37
P/S: Sử dụng hàm min và max 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:
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:
