From fd95b3d553681be478bfca6196e93303c42ab66f Mon Sep 17 00:00:00 2001 From: Bohdan Kapliuk Date: Sat, 12 Oct 2024 16:32:51 +0300 Subject: [PATCH] cv3 --- cv3/program.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cv3/program.c b/cv3/program.c index 68f8026..35cefe4 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -16,10 +16,6 @@ int main(){ char vstup[STACK_SIZE]; int counter = 0; while(1){ - if(counter > 10){ - printf("full stack\n"); - return 0; - } if (fgets(vstup, sizeof(vstup), stdin) == NULL) { printf("no input\n"); return 0; @@ -63,6 +59,10 @@ int main(){ } mystack.values[counter] = cislo; counter++; + if(counter > 10){ + printf("full stack\n"); + return 0; + } } mystack.size = counter; for(int i =0; i < counter;i++){