Question: Write a c++ program to calculate addition of two very large positive integers. The size of input integer is larger than C++ can handle, e.g.

Write a c++ program to calculate addition of two very large positive integers. The size of input integer is larger than C++ can handle, e.g. more than 30 digits. Therefore you may need consider user input as string. You may assume that the first input is not less than the second input, and all integers involved (including answer) are less than 1000 digits.

Hint: Don’t miss the fact that answer may have more or less digits than user input. e.g. 999 + 999 = 1998 (not 998), and 999 - 999 = 0 (not 000).

Step by Step Solution

3.43 Rating (172 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve the problem of adding two very large positive integers using C where the integers are larger than what Cs standard numerical types can handle ... View full answer

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!