This commit is contained in:
Weber 2024-10-14 12:32:54 +00:00
parent b69d5b381a
commit 4a7695e7ce

View File

@ -58,6 +58,7 @@ bool delit(KalkulackaZasobnik *kalkulacka) {
float a, b;
if (vyber(kalkulacka, &a, &b)) {
if (a == 0) {
printf ("division by zero\n")
return false;
}
return vloz(kalkulacka, b / a);
@ -119,14 +120,8 @@ int main() {
break;
case '/':
if (!delit(&kalkulacka)) {
if (delit==false){
printf("divison by zero\n");
return 0;
}
else{
printf("no input\n");
printf("noaaa input\n");
return 0;
}
}
zobraz_zasobnik(&kalkulacka);
break;