Menu
support@nursinghomework.org
+1 714-215-3097

(Solved) : Write Program Read Numbers Text File Numberstxt Unordered Linked List Following Task 1 Dis Q35593507

Write a program to read the numbers from the text file numbers.txt into an unordered linked list. Then do the following tasHow to Choose Yo... Al Transformation P... 1.2 2.5 -4.7 -6.9 -10 12 -13.8 -14.2 15.9Write a program to read the numbers from the text file “numbers.txt” into an unordered linked list. Then do the following task: 1. Display all the numbers. 2. Delete all the negative numbers in the list 3. Display the new list after deletion. 4. Ask the user to specify an index of the list, and delete the node by index. L.e. If the user types 2, delete the second node of the list. If the user types 3, delete the third node of the list 5. Display the new list after deletion. Bonus: 6. Ask the user to enter an index and a real number from the keyboard, and insert (not replace) the real number to the list at the position of the index. L.e. If the user types 3 and 99.99, insert 99.99 at the third place of the list, and the original third node should become the fourth. (There is no partial credit for the bonus. You will get either 0 or 1.) Display the new list after insertion. 7. Requirements: 1. You should write a function to delete the negative numbers in the list. 2. You should write a function to delete the node by index. If the index is less than 1, or if the index is greater than the length of the list, your program should display an error message instead of deleting anything. (Bonus) You should write a function to insert a node by index. If the index is less than 1, your program should display an error message instead of inserting anything. If the index is greater than the length of the list, insert the node at the tail of the list. 3. 4. After you finish your program, compress all your files, including both CPP and HPP into a single ZIP file and upload it to D2L Here is an example of how your program should look like: he list has the following numbers: 1.2 2.5 3-4.7 5.1-6.9 7.48.6 9.3-10-11.2 12 -13.8 -14.2 15.9 he list after deleting negative numbers is: 1.2 2.5 3 5.1 7.4 8.6 9.3 12 15.9 Enter the index of the number you want to delete: (starting from 1) The list after the deletion is: 2 3 5.1 7.4 8.6 9.3 12 15.9 Bonus part: nter the index of the number you want to insert: (starting from 1 How to Choose Yo… Al Transformation P… 1.2 2.5 -4.7 -6.9 -10 12 -13.8 -14.2 15.9 Show transcribed image text Write a program to read the numbers from the text file “numbers.txt” into an unordered linked list. Then do the following task: 1. Display all the numbers. 2. Delete all the negative numbers in the list 3. Display the new list after deletion. 4. Ask the user to specify an index of the list, and delete the node by index. L.e. If the user types 2, delete the second node of the list. If the user types 3, delete the third node of the list 5. Display the new list after deletion. Bonus: 6. Ask the user to enter an index and a real number from the keyboard, and insert (not replace) the real number to the list at the position of the index. L.e. If the user types 3 and 99.99, insert 99.99 at the third place of the list, and the original third node should become the fourth. (There is no partial credit for the bonus. You will get either 0 or 1.) Display the new list after insertion. 7. Requirements: 1. You should write a function to delete the negative numbers in the list. 2. You should write a function to delete the node by index. If the index is less than 1, or if the index is greater than the length of the list, your program should display an error message instead of deleting anything. (Bonus) You should write a function to insert a node by index. If the index is less than 1, your program should display an error message instead of inserting anything. If the index is greater than the length of the list, insert the node at the tail of the list. 3. 4. After you finish your program, compress all your files, including both CPP and HPP into a single ZIP file and upload it to D2L Here is an example of how your program should look like: he list has the following numbers: 1.2 2.5 3-4.7 5.1-6.9 7.48.6 9.3-10-11.2 12 -13.8 -14.2 15.9 he list after deleting negative numbers is: 1.2 2.5 3 5.1 7.4 8.6 9.3 12 15.9 Enter the index of the number you want to delete: (starting from 1) The list after the deletion is: 2 3 5.1 7.4 8.6 9.3 12 15.9 Bonus part: nter the index of the number you want to insert: (starting from 1
How to Choose Yo… Al Transformation P… 1.2 2.5 -4.7 -6.9 -10 12 -13.8 -14.2 15.9

Leave a Reply

Your email address will not be published. Required fields are marked *