15%
This commit is contained in:
		
							parent
							
								
									74b4733ee1
								
							
						
					
					
						commit
						cecb28932b
					
				| @ -14,11 +14,12 @@ | ||||
| 
 | ||||
| struct car* add_car(struct car* first,const char* target) { | ||||
|     struct car* newcar = calloc(1,sizeof(struct car)); | ||||
|     struct car* temp=first; | ||||
|     struct car* this=first; | ||||
|     int length=0; | ||||
|     while(temp!=NULL){ | ||||
|         if(temp->next!=NULL){ | ||||
|             temp=temp->next; | ||||
|     while(this!=NULL){ | ||||
|         if(this->next!=NULL){ | ||||
|             this=this->next; | ||||
|             this->next = newcar; | ||||
|         } | ||||
|         length++; | ||||
|     } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user