From 69f29b231d3787ab3ec5071abcdd1a49cbda4bf7 Mon Sep 17 00:00:00 2001 From: Deinerovych Date: Wed, 16 Oct 2024 10:10:09 +0200 Subject: [PATCH] 4 --- cv3/program.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cv3/program.c b/cv3/program.c index 25cfcc0..182b8bf 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -69,7 +69,7 @@ int main() { if (is_number(arr)) { float number = strtof(arr, &pend); push(number); - printf("%.2f ", number); + printf("%.2f\n", number); } else if (is_operation(arr)) { if (stack_top < 1) { @@ -82,7 +82,7 @@ int main() { char operation = arr[0]; float result = calculator(n1, n2, operation); push(result); - printf("%.2f ", result); + printf("%.2f\n", result); } else { printf("no input\n"); @@ -91,9 +91,9 @@ int main() { } if (stack_top == 0) { - printf("\n%.2f\n", pop()); + printf("%.2f\n", pop()); } else { - printf("\nno input\n"); + printf("no input\n"); } return 0;