Growday / growday.github.io

my code repository
1 stars 0 forks source link

Big integer addition #1

Open wintlu opened 9 years ago

wintlu commented 9 years ago

Given 2 BIG integers, calculate the addition result of them.

Input Sample: A=99999999999999999999 B=1 Result = 100000000000000000000

Why you cannot use Javascript's + ? In JS, max possible integer is +/- 9007199254740992, numbers larger/less than this number is called infinite and cannot be calculated. So to calculate big integer you have to simulate addition yourselves.