This commit is contained in:
Weber 2024-10-14 13:15:02 +00:00
parent 94b2f80db7
commit cb93144809

View File

@ -125,14 +125,22 @@ int main() {
return 0;
}
break;
case '/':
if (!delit(&kalkulacka)) {
case '/': {
float a, b;
if (vyber(&kalkulacka, &a, &b)) {
if (a == 0) {
printf("division by zero\n");
return 0;
}
} else {
vloz(&kalkulacka, b / a);
zobraz_zasobnik(&kalkulacka);
printf("no input\n");
return 0;
}
}
break;
}
}
} else {
printf("no input\n");
return 0;