From 5f087c3c3d2a9d4ecc3e807bd15f991818e74f91 Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Thu, 16 Apr 2020 19:48:09 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20'du6/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du6/program.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/du6/program.c b/du6/program.c index 54bda70..0c909dd 100644 --- a/du6/program.c +++ b/du6/program.c @@ -36,8 +36,6 @@ char names[100]; for(;fgets(list[count].fname,100,stdin);){ if(list[count].fname[0]=='\n'){ list[count].num=-1; - count++; -// printf("skip"); } if(list[count].fname[0]!='\n'){ list[count].num=0; @@ -53,7 +51,7 @@ struct LIS ilusion; char *min; char *mickro; int mini; - for(int i=0;i<=count-1;i++){ + for(int i=0;i0){ + int i=0; if(places>0){ - int k=0; - printf("Prijati studenti:\n"); + int k=1; for(int i=0;k!=places+1;i++){ if(list[i].num==0){ fputs(list[i].fname,stdout); + printf("%d ",k); k++; } } } if(count-places>0){ - int k=0; printf("Neprijati studenti:\n"); - for(int i=places+1;i