# Include <iostream> using namespace STD; Class book // create a book class {public: int num; double price; book * Next ;}; book * head = NULL; // assign the header node A blank book * creat () // create the linked list function {book * P1, * P2; // P1 points to the new object, p2 points to the next node p1 = new book; head = p1; P2 = p1; // first point the three pointers to the same node cout <"Enter the book number, end with 0. "<Endl; CIN> P1-> num; // If the input num is not 0, enter priceif (P1-> num! = 0) {cout <"Enter the price of the book:" <Endl; CIN> P1-> price;} else // if it is equal to 0, the object will be deleted, leave the last object empty and return the header pointer {Delete P1; P2 = NULL; P2-> next = NULL; return head;} while (P1-> num! = 0) // enter num and price continuously, and until num is 0; {P2 = p1; P1 = new book; cout <"Enter the book number, end with 0 "<Endl; CIN> P1-> num; If (P1-> num! = 0) {cout <"Enter the price of the book:" <Endl; CIN> P1-> price;} P2-> next = p1;} Delete P1; // if it is equal to 0, the object will be deleted, the last object will be null, And the header pointer P2-> next = NULL; return head;} void showbook (Book * head) will be returned) {cout <Endl; cout <"Book information:" <Endl; while (head) {cout <"book no: "