funguje
This commit is contained in:
parent
37cc0185d8
commit
d52244cd22
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user