diff --git a/cv3/program.c b/cv3/program.c index 251026c..31e5b27 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -1,6 +1,7 @@ #include #include #include +#include #define MAX_RAZMER 10 @@ -94,6 +95,10 @@ int main() { exit(1); } double a = pop(&stek); + if (b == 0) { + printf("division by zero\n"); + exit(1); + } push(&stek, a / b); } else { printf("no input\n");