Изменить 'du5/program.c'
This commit is contained in:
parent
46d0348629
commit
7b1cb9cf67
@ -39,13 +39,14 @@ int keep(struct LIS *list){
|
||||
}
|
||||
|
||||
int del(struct LIS *list,int count){
|
||||
for(int i=0;i<count-1;i++){
|
||||
for(int j=i+1;j<count;j++){
|
||||
int kount=count;
|
||||
for(int i=0;i<count;i++){
|
||||
for(int j=count;j>0;j--){
|
||||
if(strcmp(list[i].fname,list[j].fname)==0 && strcmp(list[i].sname,list[j].sname)==0 && list[j].num!=-1) {
|
||||
count--;
|
||||
kount--;
|
||||
list[i].num+=list[j].num;
|
||||
list[j].num=-1;
|
||||
|
||||
printf("\n%d %s %s\n",list[i].num, list[i].sname, list[i].fname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user