求编译器中数的最值(c++)
1 #include <limits> //头文件 2 #include <iostream> 3 using namespace std; 4 5 int main() 6 { 7 cout << "max(int): " << numeric_limits<int>::max() << endl; 8 cout << "min(int): " << numeric_limits<int>::min() << endl; 9 return 0; 10 }
其他类似!