From 4206a797abe690d4868332afd3cbe079eabe2ba1 Mon Sep 17 00:00:00 2001 From: Yevhen Kozirovskyi Date: Thu, 17 Oct 2024 16:43:40 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20cv3/program.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cv3/program.c | 5 +++++ 1 file changed, 5 insertions(+) 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");