From 5e526dd7e0277cfaf280b7b1077c9ad52600f8c5 Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Thu, 16 Apr 2020 20:02:53 +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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/du6/program.c b/du6/program.c index 749a20d..00f2275 100644 --- a/du6/program.c +++ b/du6/program.c @@ -70,9 +70,9 @@ void print(struct LIS *list,int count,int places){ if(count>0){ if(places>0){ int i=0; - int k=1; + int k=0; printf("Prijati studenti:\n"); - for(int i=0;k!=places+1;i++){ + for(int i=0;k!=places;i++){ if(list[i].num==0){ fputs(list[i].fname,stdout); k++; @@ -81,7 +81,7 @@ void print(struct LIS *list,int count,int places){ } if(count-places>0){ printf("Neprijati studenti:\n"); - for(int i=(count-places)+2;i<30;i++){ + for(int i=(count-places)+1;i<30;i++){ if(list[i].num==0){ fputs(list[i].fname,stdout); }