From 74f24b092d4bf7e34d91f2a586f8e4b185f8fe44 Mon Sep 17 00:00:00 2001 From: Weber Date: Mon, 14 Oct 2024 12:36:08 +0000 Subject: [PATCH] test --- cv3/program.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cv3/program.c b/cv3/program.c index c3c7d03..8fa3aa5 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -57,10 +57,6 @@ bool nasobit(KalkulackaZasobnik *kalkulacka) { bool delit(KalkulackaZasobnik *kalkulacka) { float a, b; if (vyber(kalkulacka, &a, &b)) { - if (a == 0) { - printf ("division by zero\n"); - return false; - } return vloz(kalkulacka, b / a); } return false; @@ -120,7 +116,11 @@ int main() { break; case '/': if (!delit(&kalkulacka)) { - printf("noaaa input\n"); + if (a == 0) { + printf ("division by zero\n"); + return 0; + } + printf("no input\n"); return 0; } zobraz_zasobnik(&kalkulacka);