This commit is contained in:
Your Name 2025-10-16 02:05:48 +02:00
parent a14288d57d
commit 240a8033ce

View File

@ -87,6 +87,7 @@ int main()
struct stack mystack;
memset(&mystack,0,sizeof(struct stack));
char input[1000];
int count=0;
while (fgets(input,sizeof(input),stdin)!=NULL)
{
int flag=switch_operators(input);
@ -103,12 +104,16 @@ int main()
}
else
{
printf("\n");
char* ptr;
float num=strtof(input,&ptr);
push_stack(&mystack,num);
}
print_stack(&mystack);
if(count!=2)
{
printf("\n");
}
count++;
}
return 0;
}