From 3f0adf5b6fda01b95626d2fa7b49c95b60791941 Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Thu, 9 Apr 2020 13:56:52 +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 | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/du5/program.c b/du5/program.c index a71c65d..b212cba 100644 --- a/du5/program.c +++ b/du5/program.c @@ -64,26 +64,22 @@ void Sort_Num(struct LIS *list,int count){//bubble sort :) } void Sort_Sname(struct LIS *list,int count){ struct LIS ilusion; - for(int i=0;ii;j--){ - if(list[i].num==list[j].num && strcmp(list[i].sname,list[j].sname)==0){ - for(int k=0;k0 ){ + ilusion=list[j]; + list[j]=list[j+1]; + list[j+1]=ilusion; } } } } + void print(struct LIS *list,int pult){ printf("Vysledky:\n"); for(int i=0;i