From cc19e9fd6be3e544b516263aac495e77c372b5c1 Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Thu, 16 Apr 2020 20:40:19 +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 | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) 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