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

Discussion in 'Khác' started by Blog06, Feb 26, 2023.

  1. Blog06

    Messages:
    55
    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:

    #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;

    }
     
    Hyungg and Kẻ xa lạ like this.
  2. Đăng ký Binance
Trả lời qua Facebook
Loading...