#include //C++ example #include //for setprecision #include #include //for numeric_limits using namespace std; int main() { cout << "Minimum int is " << numeric_limits::min() << ".\n" << "Maximum int is " << numeric_limits::max() << ".\n\n" << "Maximum double is " << numeric_limits::max() << ".\n" << "A double has a " << numeric_limits::digits << "-bit mantissa.\n"; int prec = numeric_limits::digits10; cout << "A double can hold " << prec << " decimal significant digits.\n"; double d = 123456789012345678.0; cout << setprecision(prec + 3) << d << "\n"; return EXIT_SUCCESS; }