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