默认数据类型的最大最小值

来源:互联网 发布:数控铣床编程实例txt 编辑:程序博客网 时间:2024/05/16 11:25
#include <iostream>#include <float.h> using namespace std;int main(){    std::cout << "int    max: \t" << INT_MAX  << std::endl;    std::cout << "int    min: \t" << INT_MIN  << std::endl;    std::cout << "long   max: \t" << LONG_MAX << std::endl;    std::cout << "long   min: \t" << LONG_MIN << std::endl;    std::cout << "float  max: \t" << FLT_MAX  << std::endl;    std::cout << "float  min: \t" << FLT_MIN  << std::endl;    std::cout << "double max: \t" << DBL_MAX  << std::endl;    std::cout << "double min: \t" << DBL_MIN  << std::endl;    system("pause");    return 0;}

原创粉丝点击