This commit is contained in:
Weber 2024-10-14 12:50:24 +00:00
parent 445f8f07e5
commit 2b1d9e648b

View File

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