On line 50 you are using j without initializing it. Same thing goes for every other time.
NathanOliver
Veteran Poster
1,084 posts since Apr 2009
Reputation Points: 215
Solved Threads: 189
Look at your loop definition. Look at the code. Compare variables.
Also, if you add num[i], num2[i], and carry, you get a value from 0 to 3. Look at your IFs to see if you do different things when you get 2. Or 1. etc. If you don't do different things, you probably don't need so many comparisons.
I'll bet you can compress that whole section (48-109) into less than 10 lines with a little thought.
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944