Изменить 'du6/program.c'
This commit is contained in:
parent
825228aa08
commit
cd2240f7bd
@ -69,11 +69,6 @@ void sort(struct LIS* list,int count){
|
||||
min=list[i].fname;
|
||||
mini=i;
|
||||
for(int j=i+1;j<=count;j++){
|
||||
if(strcmp(min,list[j].fname)==0 && strcmp(list[mini].name,list[j].name)>0){
|
||||
ilusion=list[i];
|
||||
list[i]=list[mini];
|
||||
list[mini]=ilusion;
|
||||
}
|
||||
if(strcmp(min,list[j].fname)>0){
|
||||
min=list[j].fname;
|
||||
mini=j;
|
||||
@ -83,7 +78,15 @@ void sort(struct LIS* list,int count){
|
||||
list[i]=list[mini];
|
||||
list[mini]=ilusion;
|
||||
}
|
||||
|
||||
for(int i=0;i<=count-1;i++){
|
||||
for(int j=1;j<=count;j++){
|
||||
if(strcmp(list[i].fname,list[j].fname)==0 && strcmp(list[i].name,list[j].name)>0){
|
||||
ilusion=list[i];
|
||||
list[i]=list[j];
|
||||
list[j]=ilusion;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void print(struct LIS *list,int count,int places){
|
||||
@ -116,3 +119,16 @@ void print(struct LIS *list,int count,int places){
|
||||
puts("Ziadne prihlasky");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user