This commit is contained in:
Your Name 2025-10-16 02:19:57 +02:00
parent 37cc0185d8
commit d52244cd22

View File

@ -87,10 +87,8 @@ int main()
struct stack mystack;
memset(&mystack,0,sizeof(struct stack));
char input[1000];
int no_in=0;
while (fgets(input,sizeof(input),stdin)!=NULL)
{
no_in=1;
int flag=switch_operators(input);
input[strcspn(input,"\n")]=0;
if (strlen(input)==0 || input[0]==' ')
@ -111,9 +109,8 @@ int main()
}
print_stack(&mystack);
}
if(!no_in)
{
printf("no input");
if (mystack.size == 0) {
printf("no input\n");
}
return 0;
}