Question: C++ Adding a large number with another number Requirement Defines the function aduna, which receives as parameters 2 strings of integers, a and b. At

C++ Adding a large number with another number

Requirement

Defines the function aduna, which receives as parameters 2 strings of integers, a and b. At the end of execution, the string a will contain the result of the sum of the numbers initially saved in a and b. Both strings will follow the format described above, when the function is called and after the call is completed.

Try to solve the problem without strings of auxiliary numbers.

Signature function

The function name will be aduna The function will have 2 integer parameters: a[] and b[] The function will be of type void limitation

1 a[0], b[0] 1000 The elements of the two strings (except the first element) are natural numbers in the range [0, 9](digits) It is guaranteed that a[a[0]] and b[b[0]] (the first digits of the 2 numbers) will not have the value 0 Example

a[] = {5, 1, 2, 2, 5, 8} ; b[] = {6, 2, 2, 2, 6, 7, 8} Following the function call aduna(a, b), the string a[] becomes:

a[] = {6, 3, 4, 4, 1, 6, 9}

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 Programming Questions!