From 37cc0185d8d92619ebe13e1c1f78ee7c97d0014c Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 16 Oct 2025 02:16:09 +0200 Subject: [PATCH] funguje --- du3/program.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/du3/program.c b/du3/program.c index 31d0c54..be37d71 100644 --- a/du3/program.c +++ b/du3/program.c @@ -87,9 +87,10 @@ int main() struct stack mystack; memset(&mystack,0,sizeof(struct stack)); char input[1000]; - int count=0; + 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]==' ') @@ -109,7 +110,11 @@ int main() push_stack(&mystack,num); } print_stack(&mystack); - } + } + if(!no_in) + { + printf("no input"); + } return 0; }