#include <iostream>
#include <limits>
using namespace std;        // namespace is discussed later

main () {


cout<< "int type"<<endl;
  cout << "largest int = " 
       << numeric_limits<int>::max() << endl;
  cout << "smallest int = " 
       << numeric_limits<int>::min() << endl;
       
  cout<< endl<<"float type"<<endl;
 
  cout << "smallest float = " 
       << numeric_limits<float>::min() << endl;
  cout << "largest float = " 
       << numeric_limits<float>::max() << endl;
  cout << "min exponent in binary = " 
       << numeric_limits<float>::min_exponent << endl;
  cout << "min exponent in decimal = " 
       << numeric_limits<float>::min_exponent10 << endl;
  cout << "max exponent in binary = " 
       << numeric_limits<float>::max_exponent << endl;
  cout << "max exponent in decimal = " 
       << numeric_limits<float>::max_exponent10 << endl;
  cout << "# of binary digits in mantissa: " 
       << numeric_limits<float>::digits << endl;
  cout << "# of decimal digits in mantissa: " 
       << numeric_limits<float>::digits10 << endl;
  cout << "base of exponent in float: " 
       << numeric_limits<float>::radix << endl;
  cout << "infinity in float: " 
       << numeric_limits<float>::infinity() << endl;
  cout << "float epsilon = " 
       << numeric_limits<float>::epsilon() << endl;
  cout << "float rounding error = " 
       << numeric_limits<float>::round_error() << endl;
  cout << "float rounding style = " 
       << numeric_limits<float>::round_style << endl;
     
     
  cout<<endl<< "double type"<<endl;
  cout << "smallest double = " 
       << numeric_limits<double>::min() << endl;
  cout << "largest double = " 
       << numeric_limits<double>::max() << endl;
  cout << "min exponent in binary = " 
       << numeric_limits<double>::min_exponent << endl;
  cout << "min exponent in decimal = " 
       << numeric_limits<double>::min_exponent10 << endl;
  cout << "max exponent in binary = " 
       << numeric_limits<double>::max_exponent << endl;
  cout << "max exponent in decimal = " 
       << numeric_limits<double>::max_exponent10 << endl;
  cout << "# of binary digits in mantissa: " 
       << numeric_limits<double>::digits << endl;
  cout << "# of decimal digits in double mantissa: " 
       << numeric_limits<double>::digits10 << endl;
  cout << "base of exponent in  double: " 
       << numeric_limits< double>::radix << endl;
  cout << "infinity in  double: " 
       << numeric_limits< double>::infinity() << endl;
  cout << " double epsilon = " 
       << numeric_limits< double>::epsilon() << endl; 
  cout << "double rounding error = " 
       << numeric_limits<double>::round_error() << endl;
  cout << "double rounding style = " 
       << numeric_limits<double>::round_style << endl;

 cout<<endl<< "long double type"<<endl;
 cout << "smallest long  double = " 
       << numeric_limits<long double>::min() << endl;
  cout << "largest long double = " 
       << numeric_limits<long double>::max() << endl;
  cout << "min exponent in binary = " 
       << numeric_limits<long double>::min_exponent << endl;
  cout << "min exponent in decimal = " 
       << numeric_limits<long double>::min_exponent10 << endl;
  cout << "max exponent in binary = " 
       << numeric_limits<long double>::max_exponent << endl;
  cout << "max exponent in decimal = " 
        << numeric_limits<long double>::max_exponent10 << endl;
  cout << "# of binary digits in long double mantissa: " 
       << numeric_limits<long double>::digits << endl;
  cout << "# of decimal digits in long double mantissa: " 
       << numeric_limits<long double>::digits10 << endl;
  cout << "base of exponent in long double: " 
       << numeric_limits<long double>::radix << endl;
  cout << "infinity in long double: " 
       << numeric_limits<long double>::infinity() << endl;
  cout << "long double epsilon = " 
       << numeric_limits<long double>::epsilon() << endl; 
  cout << "long double rounding error = " 
       << numeric_limits<long double>::round_error() << endl;
  cout << "long double rounding style = " 
       << numeric_limits<long double>::round_style << endl;
       
  cout<<endl<< "char type"<<endl;
  cout << "number of digits in char: " 
       << numeric_limits<char>::digits << endl;
  cout << "char is singed or not: "
       << numeric_limits<char>::is_signed << endl;
  cout << "smallest char: "
       << numeric_limits<char>::min() << endl;
  cout << "biggest char: "
       << numeric_limits<char>::max() << endl;
  cout << "is char an integral type: "
       << numeric_limits<char>::is_integer << endl;
       }
