Изменить 'du5/program.c'

This commit is contained in:
Pavlo Tverdyi 2020-04-09 10:31:46 +00:00
parent e50b69e903
commit 96ded11786

View File

@ -70,28 +70,18 @@ void Sort_Struct(struct LIS *list,int count){//bubble sort :)
}
}
}
if(trcmp(list[i].num,list[j].num)==0 && strcmp(list[i].sname,list[j].sname)==0 ){
if(list[i].num==list[j].num && strcmp(list[i].sname,list[j].sname)==0 ){
for(int l=0;l<strlen(list[i].fname);l++){
if(list[i].fname<list[i+1].fname){
ilusion=list[i];
list[i]=list[i+1];
list[i+1]=ilusion;
break;
}
}
}
}
}
}
/*
3RebborgmaGahvux
3RomakMalak
3KaiyeKaiza
3NemakKohr
4AriakK'ehari
4MyneLajad
*/
void print(struct LIS *list,int count){
printf("Vysledky:\n");
for(int i=0;i<count;i++){