本文共 620 字,大约阅读时间需要 2 分钟。
// Program 3.3 Finding maximum and minimum values for data types#include <limits>#include <iostream>using std::cout;using std::endl;using std::numeric_limits;
int main() { cout << endl << "The range for type short is from " << numeric_limits<short>::min() << " to " << numeric_limits<short>::max(); cout << endl << "The range for type int is from " << numeric_limits<int>::min() << " to " << numeric_limits<int>::max();
long float double ......
cout << endl << "The range for type long double is from " << numeric_limits<long double>::min() << " to " << numeric_limits<long double>::max(); cout << endl; return 0;}
转载地址:https://blog.csdn.net/id19870510/article/details/5313397 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!