Update du3/program.c
This commit is contained in:
parent
837de1e95e
commit
3a51751867
@ -27,7 +27,7 @@ void push_stack(struct stack *s, float value) {
|
|||||||
|
|
||||||
float pop_stack(struct stack *s) {
|
float pop_stack(struct stack *s) {
|
||||||
if (s->size <= 0) {
|
if (s->size <= 0) {
|
||||||
printf("not enough operands\n");
|
printf("no input\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
s->size--;
|
s->size--;
|
||||||
@ -45,7 +45,7 @@ int main() {
|
|||||||
strcmp(input, "*") == 0 || strcmp(input, "/") == 0) {
|
strcmp(input, "*") == 0 || strcmp(input, "/") == 0) {
|
||||||
|
|
||||||
if (s.size < 2) {
|
if (s.size < 2) {
|
||||||
printf("no input\n");
|
printf("not enough operands\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user