programforrangeofdatatypes

programforrangeofdatatypes - cout<<"maximum...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> #include <climits> // defines the constants SHRT_MIN,etc. #include <cfloat> using namespace std; int main() { // prints some of the constants stored in the <climits> header; cout << "minimum short="<< SHRT_MIN << endl; cout << "maximum short="<< SHRT_MAX << endl; cout << "minimum unsigned short= 0" << endl; cout << "maximum unsigned short="<< USHRT_MAX << endl; cout << "minimum int="<< INT_MIN << endl; cout << "maximum int="<< INT_MAX << endl; cout << "minimum unsigned int= 0" << endl;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cout << "maximum unsigned int="<< UINT_MAX << endl; cout << "minimum long=" << LONG_MIN << endl; cout << "maximum long=" << LONG_MAX << endl; cout << "minimum unsigned long= 0" << endl; cout << "maximum unsigned long="<< ULONG_MAX << endl; cout << "minimum float="<< FLT_MIN << endl; cout << "maximum float="<< FLT_MAX << endl; cout << "minimum double="<< DBL_MIN << endl; cout << "maximum double="<< DBL_MAX << endl; return 0; } output...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online