This commit is contained in:
Your Name 2025-10-16 03:57:36 +02:00
parent ef75bb1915
commit 3916fb6acd

View File

@ -102,6 +102,11 @@ int main()
printf("division by zero\n"); printf("division by zero\n");
return 0; return 0;
} }
if(mystack.size==1)
{
printf("not enough operands\n");
return 0;
}
float op_num=pop_stack(&mystack,input); float op_num=pop_stack(&mystack,input);
push_stack(&mystack,op_num); push_stack(&mystack,op_num);
} }