From d52244cd222d9dc67c6517684b3a8a8c23c1281f Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 16 Oct 2025 02:19:57 +0200 Subject: [PATCH] funguje --- du3/program.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/du3/program.c b/du3/program.c index be37d71..29718e3 100644 --- a/du3/program.c +++ b/du3/program.c @@ -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,10 +109,9 @@ int main() } print_stack(&mystack); } - if(!no_in) - { - printf("no input"); - } + if (mystack.size == 0) { + printf("no input\n"); + } return 0; }