View difference between Paste ID: EDAF062C and VvMZSYNU
SHOW: | | - or go back to the newest paste.
1
My numbers are 23 and 45.															M		I		Ai		Bi		Carry		Ci
2-
2+
3
Step 2: Set i equal to 0															2		0		3		5		0
4-
4+
5
Step 4: Add the two digits ai and bi to the current value of carry to get ci		2		0		3		5		0			8
6-
6+
7
and reset the value of carry to 1 otherwise set the new value of carry to 0
8-
8+
9
Step 4: Add Ai and Bi to carry to get Ci				 							2		1		2		4		0			6
10-
10+
11
and reset the value of carry to 1 otherwise set the new value of carry to 0
12
Step 6: Add 1 to the value of 1														2		2		0		0		0			0
13-
13+
Step 7: Set the value of cm to the value of carry									2		2		0		0		0			0
14
Step 8: Print out the value of Cm, Cm-1, Cm-2...C0									2		2		0		0		0			0
15-
15+
16
Final answer: 23 + 45 = 68