diff --git a/du6/program.c b/du6/program.c index bce7c7d..a700c3b 100644 --- a/du6/program.c +++ b/du6/program.c @@ -81,7 +81,7 @@ void print(struct LIS *list,int count,int places){ if(count>0){ if(places>0){ printf("Prijati studenti:\n"); - for(int i=0;i<=count;i++){ + for(int i=0;i<=count-1;i++){ if(list[i].num==2){ printf("%s\n",list[i].fname); } @@ -92,7 +92,7 @@ void print(struct LIS *list,int count,int places){ } if(count-places>0){ printf("Neprijati studenti:\n"); - for(int i=0;i<=count;i++){ + for(int i=0;i<=count-1;i++){ if(list[i].num==3){ printf("%s\n",list[i].fname); }