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