#include #include using namespace std; int main() { float normal {0.1f}; float normal1 {.01f}; // 1.23 x 10 ^ 4 = 12300 // 3.64 x 10 ^ 99 // 6.2 x 10 ^ -4 = 0.00062 // 8.34 x 10^ -99 // -9.2 x 10^ -23 // -8.2 x 10^ 82 float small {1.0E-10f}; // 0.0000000001 = 1.0 x 10 ^ -10 float big {3.4e15f}; float err = 1.0f/10.0f; // 0.1 cout << "A float is " << sizeof(float) << " bytes." << endl; cout << "A double is " << sizeof(double) << " bytes." << endl; cout << "A long double is " << sizeof(long double) << " bytes." << endl; cout << endl; cout << "normal = " << normal << endl; cout << "small = " << small << endl; cout << "big = " << big << endl; cout << endl; cout << setprecision(15); cout << "1/10 = " << err << endl; cout << "normal = " << normal << endl; cout << endl; cout << "int(4.9) = " << int(4.9) << endl; cout << "int(4.3) = " << int(4.3) << endl; int num {1}; int denom{2}; float fraction{0}; cout << endl; fraction = float(num) / float(denom); cout << num << " / " << denom << " = " << fraction << endl; return 0; }