// This is the same main we used in Week07 - we will keep working in here // This week we have three problems to do as revision // Sasha Vassar Week10, Lecture 17 /* Problem 1: Find all the elements in the linked list that are divisible by a specified number and output all of these numbers Now delete all the nodes that are divisible by the specified number Problem 2: Find the range (the difference between the biggest term and the smallest term) of a linked list Problem 3: Insert the a number into the linked list in the middle of the linked list. Assume that there is always going to be an off number of numbers in the list before insertion */ #include #include "linked_list.h" int main (void) { struct node *head = NULL; head = create_node(9, head); insert_endnode(9, head); insert_endnode(1, head); insert_endnode(6, head); insert_endnode(5, head); insert_endnode(4, head); print_list(head); // find_divisible(3, head); // head = delete_divisible(3, head); // print_list(head); printf("The range is %d\n", find_range(head)); //insert_mid(13, head); //print_list(head); return 0; }