From 566680fe0683163de2f9995e309c76bfc638869d Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Wed, 8 Apr 2020 21:13:23 +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'du5/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du5/program.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/du5/program.c b/du5/program.c index 27a28a4..be18faa 100644 --- a/du5/program.c +++ b/du5/program.c @@ -32,6 +32,7 @@ int keep(struct LIS *list){ char *array; int stop,count; int num; +int ss; for(int i=0; stop!=EOF; i++){ array=(char*)malloc(100); stop =0; @@ -63,20 +64,15 @@ int del(struct LIS *list,int count){ } void Sort_Struct(struct LIS *list,int count){ + struct LIS ilusion; - for(int i=0;i1;j--){ - if(strcmp(list[i].sname,list[j].sname)!=0){ - for(int k=0;klist[j].sname[k]){ - ilusion=list[i]; - list[i]=list[j]; - list[j]=list[i]; - } - } + for(int j=count;j>i;j--){ + if(list[i].num