salron3

Prebroqvane

May 30th, 2017
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. int ct(lst *head)
  2. {
  3.     if (head == NULL)
  4.     {
  5.         printf("The list is empty");
  6.         return;
  7.     }
  8.     int countOfNode = 0;
  9.  
  10.     while (head != NULL)
  11.     {
  12.         if (head->data.num < 10)
  13.         {
  14.             countOfNode++;
  15.         }
  16.         head = head->next;
  17.     }
  18.     return countOfNode;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment