|
hello, please I need some one to solve my assignment in link list and I would appreciate your feedback
Write a program that maintains and operates on lists of integers. The user of the program may print a list, start a new list, add or delete integers from a list, etc. The program reads instructions from a text file called hw04.txt. Each instruction is specified on a separate text line. After an instruction is performed, the program should take another instruction until instructed to quit. Here’s a complete list of possible instructions: w x → switch to list # x, thus list # x becomes the current list. The program maintains 9 lists, numbered 1 to 9. Initially, list # 1 is the current list. p → print the current list. n → clears the current list to empty. a x → add integer x to the current list. if x already in the list, ignore, but prints a warning message. d y → delete integer y from the current list. print a warning message if y is not in the list. c → print the number of elements in the current list. s → print the sum of the elements in the current list. g z → sets the current list to a new list made of the first z fibonacci numbers. q → quits the program. The List must be maintained in an ascending order.
|