

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:
#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;
}
Written by Blog06's teacher: >
Pls report it to me if there is anything wrong!
Code c++ tính giá trị min, max:
#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;
}