diff --git a/documents/references.md b/documents/references.md index 0b685f8937dcb400825ab8593891ff23e5a81818..78c301432906c2f450a329ca285ba49f170493e6 100644 --- a/documents/references.md +++ b/documents/references.md @@ -7,6 +7,9 @@ Includes anything from stack overflow links to notes about logic from previous w ## References +### Specifying Decimal Places to Print Out +<https://stackoverflow.com/a/12761583> + ### All Printf Format Types <https://www.tutorialspoint.com/c_standard_library/c_function_printf.htm> diff --git a/main.c b/main.c index 6c8b57791b2a7b4549c02994dc4e62bc068b8ba7..fd2075d1af947232c886a344df22864da58e7055 100644 --- a/main.c +++ b/main.c @@ -18,6 +18,11 @@ // Method Declaration. +void problem_1(); +void problem_2(); +void problem_3(); +void problem_4(); +void problem_5(); /** @@ -27,5 +32,90 @@ int main(int argc, char* argv[]) { printf("Starting program.\n"); - printf("Terminating program.\n"); + problem_1(); + problem_2(); + problem_3(); + problem_4(); + problem_5(); + + printf("\n\nTerminating program.\n"); +} + + +/** + * Problem 1 + * + * Declares a float of 2.5. + * Then prints to ten decimal places. + */ +void problem_1() { + printf("\n\nProblem 1 start.\n\n"); + printf("Expected Output:\n"); + printf("2.5000000000\n"); + printf("Actual Output:\n"); + + float test_float = 2.5; + printf("%.10lf\n", test_float); + + printf("\nProblem 1 end.\n"); +} + + +/** + * Problem 2 + * + * + */ +void problem_2() { + printf("\n\nProblem 2 start.\n\n"); + printf("Expected Output:\n"); + printf("\n"); + printf("Actual Output:\n"); + + printf("\nProblem 2 end.\n"); +} + + +/** + * Problem 3 + * + * + */ +void problem_3() { + printf("\n\nProblem 3 start.\n\n"); + printf("Expected Output:\n"); + printf("\n"); + printf("Actual Output:\n"); + + printf("\nProblem 3 end.\n"); +} + + +/** + * Problem 4 + * + * + */ +void problem_4() { + printf("\n\nProblem 4 start.\n\n"); + printf("Expected Output:\n"); + printf("\n"); + printf("Actual Output:\n"); + + printf("\nProblem 4 end.\n"); +} + + +/** + * Problem 5 + * + * + */ +void problem_5() { + printf("\n\nProblem 5 start.\n\n"); + printf("Expected Output:\n"); + printf("\n"); + printf("Actual Output:\n"); + + printf("\nProblem 5 end.\n"); }