Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int ct(lst *head)
- {
- if (head == NULL)
- {
- printf("The list is empty");
- return;
- }
- int countOfNode = 0;
- while (head != NULL)
- {
- if (head->data.num < 10)
- {
- countOfNode++;
- }
- head = head->next;
- }
- return countOfNode;
- }
Advertisement
Add Comment
Please, Sign In to add comment