du3 - 8
This commit is contained in:
parent
6171013c42
commit
253ec0c3ff
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user