diff --git a/du6/program.c b/du6/program.c index 00f2275..a04ecac 100644 --- a/du6/program.c +++ b/du6/program.c @@ -11,6 +11,7 @@ int num; char keep(struct LIS*,int); void sort(struct LIS*,int); void print(struct LIS*,int,int); +void AAAAA(struct LIS*, int,int); int main(){ @@ -24,6 +25,7 @@ if(k!=1 || places<0){ else{ int count=keep(list,places); sort(list,count); + AAAAA(list,count,places); print(list,count,places); } return 0; @@ -69,19 +71,16 @@ int mini; void print(struct LIS *list,int count,int places){ if(count>0){ if(places>0){ - int i=0; - int k=0; printf("Prijati studenti:\n"); - for(int i=0;k!=places;i++){ - if(list[i].num==0){ + for(int i=0;i0){ fputs(list[i].fname,stdout); - k++; } } } if(count-places>0){ printf("Neprijati studenti:\n"); - for(int i=(count-places)+1;i<30;i++){ + for(int i=0;i