From 5b84218b3fbb2cf9a1f5d3ada378f06b59f39a44 Mon Sep 17 00:00:00 2001 From: Viktor Daniv Date: Mon, 7 Oct 2024 12:33:45 +0000 Subject: [PATCH] Update cv3/program.c --- cv3/program.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cv3/program.c b/cv3/program.c index b506889..ca56b88 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -63,7 +63,10 @@ int perform_operation(Calculator *calc, char op) { if (b == 0) { printf("division by zero\n"); break; + } else { + printf("no input\n"); } + push(calc, a / b); break; default: @@ -72,7 +75,7 @@ int perform_operation(Calculator *calc, char op) { } print_stack(calc); - printf("no input\n"); + return 1; }