This commit is contained in:
mr314ot 2025-10-16 13:04:11 +02:00
parent 6171013c42
commit 253ec0c3ff

View File

@ -72,8 +72,8 @@ int main(void) {
} else if (strlen(line) == 1 && strchr("+-*/", line[0])) {
//operacia
if (s.size < 2) {
printf("Chyba: nedostatok operandov.\n");
return 1;
printf("not enough operands\n");
return 0;
}
float b = pop_stack(&s);
float a = pop_stack(&s);
@ -91,7 +91,7 @@ int main(void) {
result = a / b; break;
default:
printf("Chyba: neznama operacia.\n");
return 1;
return 0;
}
push_stack(&s, result);
} else {