From 1379e394cb90a72b1e81e5087c05b46e949bb950 Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Wed, 8 Apr 2020 21:28:42 +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 | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/du5/program.c b/du5/program.c index be18faa..f6d729b 100644 --- a/du5/program.c +++ b/du5/program.c @@ -63,8 +63,7 @@ int del(struct LIS *list,int count){ return count; } -void Sort_Struct(struct LIS *list,int count){ - +void Sort_Struct(struct LIS *list,int count){//bubble sort :) struct LIS ilusion; for(int i=0;ii;j--){ @@ -73,6 +72,24 @@ void Sort_Struct(struct LIS *list,int count){ list[i]=list[j]; list[j]=ilusion; } + if(list[i].num==list[j].num){ + for(int k=0;k