Update cv3/program.c

This commit is contained in:
Yurii Chechur 2024-10-13 15:18:28 +00:00
parent 83c10a1b37
commit 3f55bc676e

View File

@ -52,7 +52,7 @@ int read(struct stack *s) {
// Check for empty input
if (strcmp(temp, "\n") == 0) {
printf("bad input\n");
printf("no input\n");
exit(1); // Exit on empty input
}
@ -99,7 +99,7 @@ int read(struct stack *s) {
}
push_stack(s, result); // Push the result back onto the stack
print_stack(s); // Print the stack after operation
printf("bad input\n"); // Print the "no input" message
printf("no input\n"); // Print the "no input" message
exit(0); // Exit the program after the operation
break;
}