diff --git a/du6/program.c b/du6/program.c index a995a02..3852a57 100644 --- a/du6/program.c +++ b/du6/program.c @@ -68,8 +68,8 @@ int mini; void print(struct LIS *list,int count,int places){ if(count>0){ - int i=0; if(places>0){ + int i=0; int k=1; printf("Prijati studenti:\n"); for(int i=0;k!=places+1;i++){ @@ -81,7 +81,7 @@ void print(struct LIS *list,int count,int places){ } if(count-places>0){ printf("Neprijati studenti:\n"); - for(i;i<30;i++){ + for(i=(count-places+1);i<30;i++){ if(list[i].num==0){ fputs(list[i].fname,stdout); }