Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1. LIST *ReturnCertainIncomeArtistList(LIST *root, float income)
  2. {
  3.     LIST *newList = NULL;
  4.     LIST *curr = root;
  5.  
  6.     while (curr != NULL)
  7.     {      
  8.         if (curr->artist.income > income)
  9.         {
  10.             newList->artist = curr->artist;
  11.             newList->next = malloc(sizeof(newList));
  12.             newList = newList->next;
  13.         }
  14.  
  15.         curr = curr->next;
  16.     }
  17.  
  18.     return newList;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement