diff --git a/cv3/program.c b/cv3/program.c index ed5f2f2..48006f4 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -43,7 +43,7 @@ void push(float number) { if (stack_top < STACK_SIZE - 1) { stack[++stack_top] = number; } else { - printf("Error: stack overflow\n"); + printf("stack overflow\n"); exit(0); } } @@ -52,7 +52,7 @@ float pop() { if (stack_top >= 0) { return stack[stack_top--]; } else { - printf("Error: stack is empty\n"); + printf("stack is empty\n"); exit(0); } } @@ -95,7 +95,12 @@ int main() { push(result); print_stack(); } + else { + printf("bad input\n"); + return 0; + } } + printf("no input\n"); return 0;