Question: Overview This assignment is designed to give you experience in manipulating singly linked lists. Description The input file contains several pairs of integers of arbitrary

Overview This assignment is designed to give you experience in manipulating singly linked lists. Description The input file contains several pairs of integers of arbitrary length. Data is terminated by a line containing -1 only. Your program must read two integers from the file. The built-in data types such as int and long have a maximum fixed length so variables of these types cannot be used to input the integers from the file. Each large integer must be read from the file and stored in a singly linked list, one digit per node. The least significant digit of the large integer must be stored at the top of the list and the most significant digit must be stored at the end of the list. Assume that each large integer has at most 50 digits. After creating the linked lists for the two large integers, you must find the sum of the integers. This sum must be stored in another linked list. Finally, your program must display the two large integers, exactly as they were read from the file as well as their sum. See Example 1 and Example 2 for the format required. [PTO] Input: Large Integer 1: 957994954495949457454 Large Integer 2: 774874754744875847484 Your output should be similar to this: 957994954495949457454 + 774874754744875847484 ====================== 1732869709240825304938 ====================== Example 1 Input: Large Integer 1: 80485080443358 Large Integer 2: 4849850549686868696 Your output should be similar to this: 80485080443358 + 4849850549686868696 =================== 4849931034767312054 =================== Example 2

Input Data for Testing (Data are terminated by -1) 957994954495949457454 774874754744875847484 80485080443358 4849850549686868696 99999999 11111111111111111876333 777777678 9999999999 5555555555 44444444444444444465 -1

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!