programforrangeofdatatypes

programforrangeofdatatypes - cout <<...

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 &lt;&lt; &quot;maximum unsigned int=&quot;&lt;&lt; UINT_MAX &lt;&lt; endl; cout &lt;&lt; &quot;minimum long=&quot; &lt;&lt; LONG_MIN &lt;&lt; endl; cout &lt;&lt; &quot;maximum long=&quot; &lt;&lt; LONG_MAX &lt;&lt; endl; cout &lt;&lt; &quot;minimum unsigned long= 0&quot; &lt;&lt; endl; cout &lt;&lt; &quot;maximum unsigned long=&quot;&lt;&lt; ULONG_MAX &lt;&lt; endl; cout &lt;&lt; &quot;minimum float=&quot;&lt;&lt; FLT_MIN &lt;&lt; endl; cout &lt;&lt; &quot;maximum float=&quot;&lt;&lt; FLT_MAX &lt;&lt; endl; cout &lt;&lt; &quot;minimum double=&quot;&lt;&lt; DBL_MIN &lt;&lt; endl; cout &lt;&lt; &quot;maximum double=&quot;&lt;&lt; DBL_MAX &lt;&lt; endl; return 0; } output...
View Full Document

Ask a homework question - tutors are online