diff --git a/main.c b/main.c index 1420c8985b4e4d0fe15e66da7d2e6b703456a7fa..20ee8684b383ba13782bb3c56d7565e056bab78f 100644 --- a/main.c +++ b/main.c @@ -83,14 +83,21 @@ void problem_2() { /** * Problem 3 * - * + * Declare a double of "1/3". + * Declare a double of "1.0/3.0". + * Then print both to console. */ void problem_3() { printf("\n\nProblem 3 start.\n\n"); printf("Expected Output:\n"); - printf("\n"); + printf("0.3333333333\n"); printf("Actual Output:\n"); + double test_double = 1/3; + printf("%.10f\n", test_double); + test_double = 1.0/3.0; + printf("%.10f\n", test_double); + printf("\nProblem 3 end.\n"); }