1 2 3
void print (Nodeptrlist) { for ( ; list != NULL; list = list->next) printf ("%d ", list->data); printf ("\n"); }
Use insert-sort function to place items in descending order and print function to display them
void main (void) { Nodeptrlist = NULL; int item;
while (scanf ("%d", &item) != EOF) if (insertsort (&list, item) == NULL) break; print(list);
3