diff --git a/cv3/program.c b/cv3/program.c index 41ef5f3..513de3b 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -58,6 +58,7 @@ 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); @@ -119,14 +120,8 @@ int main() { break; case '/': if (!delit(&kalkulacka)) { - if (delit==false){ - printf("divison by zero\n"); - return 0; - } - else{ - printf("no input\n"); + printf("noaaa input\n"); return 0; - } } zobraz_zasobnik(&kalkulacka); break;