This commit is contained in:
Your Name 2025-10-16 03:44:02 +02:00
parent ac1a90da79
commit fb7cbf1ad2

View File

@ -20,8 +20,7 @@ void push_stack(struct stack* mystack, float value)
int switch_operators(const char input[]) int switch_operators(const char input[])
{ {
if(strlen(input)==1)
{
switch (input[0]) switch (input[0])
{ {
case '+': case '+':
@ -37,8 +36,7 @@ int switch_operators(const char input[])
return -1; return -1;
break; break;
} }
}
return 1;
} }
float pop_stack(struct stack* mystack,const char input[]) float pop_stack(struct stack* mystack,const char input[])