This commit is contained in:
Weber 2024-10-14 12:04:21 +00:00
parent c2a2cec96c
commit 6264462a3d

View File

@ -59,8 +59,9 @@ bool delit(KalkulackaZasobnik *kalkulacka) {
if (vyber(kalkulacka, &a, &b)) {
if (a == 0) {
printf("division by zero\n");
return false; // Delenie nulou
return false;
}
return vloz(kalkulacka, b / a);
}
return false;
@ -122,6 +123,10 @@ int main() {
if (!delit(&kalkulacka)) {
return 0;
}
else{
printf("no input\n")
return 0;
}
zobraz_zasobnik(&kalkulacka);
break;
default: