Basic Data Types

  • + 22 comments

    MAKE SURE YOU READ THIS BEFORE SUBMITTING.

    For some reason beyond my understanding, the test cases will not pass if you don't set the precision for float to 3 and double to 9.

    You can do this by including and using setprecision() while printing like this:

    cout << setprecision( 3 ) << fixed << floatVar << endl;

    cout << setprecision( 9 ) << fixed << doubleVar << endl;