Изменить 'du5/program.c'
This commit is contained in:
		
							parent
							
								
									1b82a22be0
								
							
						
					
					
						commit
						1a0cf13d16
					
				@ -75,7 +75,13 @@ void Sort_Struct(struct LIS *list,int count){//bubble sort :)
 | 
			
		||||
               list[j]=ilusion;
 | 
			
		||||
            }
 | 
			
		||||
            if(list[i].num==list[j].num){
 | 
			
		||||
                for(int k=0;k<strlen(list[i].sname);k++){
 | 
			
		||||
                if(strlen(list[i].sname)>strlen(list[j].sname)){\
 | 
			
		||||
                    val=strlen(list[i].sname);
 | 
			
		||||
                }
 | 
			
		||||
                else{
 | 
			
		||||
                    val=strlen(list[j].sname);
 | 
			
		||||
                }
 | 
			
		||||
                for(int k=0;k<val;k++){
 | 
			
		||||
                    if(list[i].sname<list[j].sname && list[j].num!=-1 && list[i].num!=-1){
 | 
			
		||||
                        ilusion=list[i];
 | 
			
		||||
                        free(list[i].sname);
 | 
			
		||||
@ -85,7 +91,13 @@ void Sort_Struct(struct LIS *list,int count){//bubble sort :)
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            if(list[i].num==list[j].num && list[i].sname==list[j].sname){
 | 
			
		||||
                for(int l=0;l<strlen(list[i].fname);l++){
 | 
			
		||||
                if(strlen(list[i].fname)>strlen(list[j].fname)){\
 | 
			
		||||
                    val=strlen(list[i].fname);
 | 
			
		||||
                }
 | 
			
		||||
                else{
 | 
			
		||||
                    val=strlen(list[j].fname);
 | 
			
		||||
                }
 | 
			
		||||
                for(int l=0;l<val;l++){
 | 
			
		||||
                    if(list[i].fname<list[j].fname && list[j].num!=-1 && list[i].num!=-1){
 | 
			
		||||
                        ilusion=list[i];
 | 
			
		||||
                        free(list[i].fname);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user