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