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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started