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; }