From 27dee38dacaeaf4449b8ad99602e86ac1e0b943c Mon Sep 17 00:00:00 2001 From: Brandon Rodriguez <brodriguez8774@gmail.com> Date: Thu, 23 Jan 2020 02:14:47 -0500 Subject: [PATCH] Make program output more legible --- main.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/main.c b/main.c index bf362bb..2f69436 100644 --- a/main.c +++ b/main.c @@ -33,12 +33,19 @@ void problem_6(); int main(int argc, char* argv[]) { printf("Starting program.\n"); + printf("\n=================================================="); problem_1(); + printf("\n=================================================="); problem_2(); + printf("\n=================================================="); problem_3(); + printf("\n=================================================="); problem_4(); + printf("\n=================================================="); problem_5(); + printf("\n=================================================="); problem_6(); + printf("\n=================================================="); printf("\n\nTerminating program.\n"); } @@ -54,7 +61,7 @@ void problem_1() { printf("\n\nProblem 1 start.\n\n"); printf("Expected Output:\n"); printf("2.5000000000\n"); - printf("Actual Output:\n"); + printf("\nActual Output:\n"); float test_float = 2.5; printf("%.10lf\n", test_float); @@ -73,7 +80,7 @@ void problem_2() { printf("\n\nProblem 2 start.\n\n"); printf("Expected Output:\n"); printf("-0.1000000000\n"); - printf("Actual Output:\n"); + printf("\nActual Output:\n"); float test_float = -1.0/10.0; printf("%.10lf\n", test_float); @@ -93,7 +100,8 @@ void problem_3() { printf("\n\nProblem 3 start.\n\n"); printf("Expected Output:\n"); printf("0.3333333333\n"); - printf("Actual Output:\n"); + printf("0.3333333333\n"); + printf("\nActual Output:\n"); double test_double = 1/3; printf("%.10f\n", test_double); @@ -115,7 +123,8 @@ void problem_4() { printf("\n\nProblem 4 start.\n\n"); printf("Expected Output:\n"); printf("9999999.3399999999\n"); - printf("Actual Output:\n"); + printf("9999999.3399999999\n"); + printf("\nActual Output:\n"); double test_double = 9999999.3399999999; printf("%.10f\n", test_double); @@ -148,7 +157,7 @@ void problem_5() { printf("2500000000\n"); printf("3600000000\n"); printf("4900000000\n"); - printf("Actual Output:\n"); + printf("\nActual Output:\n"); int test_int = 30000*30000; printf("%d\n", test_int); @@ -185,7 +194,7 @@ void problem_6() { printf("100000002007587734272\n"); printf("103500002052240572416\n"); printf("103500002052240572416\n"); - printf("Actual Output:\n"); + printf("\nActual Output:\n"); float test_float = 1e20; printf("%.10lf\n", test_float); -- GitLab