This commit is contained in:
Weber 2024-10-14 11:49:10 +00:00
parent 818931c4fb
commit a3ca850437

View File

@ -58,7 +58,7 @@ bool delit(KalkulackaZasobnik *kalkulacka) {
float a, b;
if (vyber(kalkulacka, &a, &b)) {
if (a == 0) {
return false;
return false; // Delenie nulou
}
return vloz(kalkulacka, b / a);
}
@ -122,7 +122,7 @@ int main() {
if (delit(&kalkulacka)) {
zobraz_zasobnik(&kalkulacka);
} else {
printf("no input\n");
printf("division by zero\n");
return 0;
}
break;