How to add and subtract 2 numbers using string? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to add and subtract 2 numbers using string?

One of the numbers is so huge that it cannot be stored in any data type

18th Aug 2019, 2:08 PM
Awsaf Zidane
Awsaf Zidane - avatar
1 Answer
+ 5
One option is to take one digit at a time from both numbers and subtracting then with the borrow. Look here for addition examples: https://www.sololearn.com/learn/13549/?ref=app
18th Aug 2019, 2:48 PM
daniel
daniel - avatar