Обновить cv3/program.c

This commit is contained in:
Yevhen Kozirovskyi 2024-10-17 16:46:52 +00:00
parent 4206a797ab
commit 276b7f7ea1

View File

@ -94,9 +94,11 @@ int main() {
printf("no input\n"); printf("no input\n");
exit(1); exit(1);
} }
double a = pop(&stek); double a = pop(&stek);
if (b == 0) { if (b == 0) {
printf("division by zero\n"); printf("division by zero\n");
return 0;
exit(1); exit(1);
} }
push(&stek, a / b); push(&stek, a / b);
@ -111,4 +113,4 @@ int main() {
} }
printf("no input\n"); printf("no input\n");
return 0; return 0;
} }