fork download
  1. #include <iostream>
  2. #include <climits>
  3. #include <cfloat>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. // 32 bit 2's comp int and 32 bit IEEE 754 float theoretical max vals
  10. cout << "2147483647 : 3.4028234*10^38" << endl;
  11.  
  12. // int and float actuall vals on this system
  13. cout << INT_MAX << " : " << FLT_MAX << endl;
  14.  
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
2147483647 : 3.4028234*10^38
2147483647 : 3.40282e+38