test
This commit is contained in:
parent
445f8f07e5
commit
2b1d9e648b
@ -114,13 +114,20 @@ int main() {
|
||||
printf("no input\n");
|
||||
}
|
||||
break;
|
||||
case '/':
|
||||
if (!delit(&kalkulacka)) {
|
||||
printf("division by zero\n");
|
||||
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 {
|
||||
zobraz_zasobnik(&kalkulacka);
|
||||
printf("no input\n");
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
printf("no input\n");
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user