Question: Create an arithmetic program that stores integers in linked list nodes. Each node will store a three digit integer, Subsequent nodes will hold parts of

Create an arithmetic program that stores integers in linked list nodes. Each node will store a three digit integer, Subsequent nodes will hold parts of numbers that are greater than four digits long. For example: 2,101,453,788 would be represented by four nodes, the first being left padded with zeros, resulting in 002 101 453 788 Your program will need to overload the arithmetic operators + and Each number input to the program shall have its own linked list and the result of the arithmetic shall be stored in a results linked list. The final result of the arithmetic operation shall be output to the console, with each part of the number listed with its node location. Example: If we wanted to add 10,000 and 845 the output result would be: The answer is Node 1 = 010 Node 2 = 845 Giving 10,845

****

After setting up the linked list I am confused about how to break up a number like 3333 into 2 nodes 003 and 333.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!