最小值和最大值

基本类型 / 数字 / 数学运算

#include <iostream>
#include "math.h"
using namespace std;   

int minValue = min(min(2, 1), 3);
//minValue is 1

int maxValue = max(max(2, 1), 3);
//maxValue is 3

cout << "minValue is " << minValue << endl;
cout << "maxValue is " << maxValue;