Download presentation

Presentation is loading. Please wait.

Published byJustine Dugdale Modified over 3 years ago

1
Add two strings representing numbers + 8 87 42 9 1 63 5 Carry = 0 S1 = S2 = S3 =

2
Add two strings representing numbers + 8 87 42 9 1 63 5 Carry = 0 S1 = S2 = S3 = First iteration ( i=1 ): n1 = S1(length(S1)+i-1)-'0';

3
Add two strings representing numbers + 8 87 42 9 1 63 5 Carry = 0 S1 = S2 = S3 = First iteration ( i=1 ): n2 = S2(length(S2)+i-1)-'0';

4
Add two strings representing numbers + 8 87 42 9 1 63 5 Carry = 0 S1 = S2 = S3 = First iteration ( i=1 ): n = n1 + n2 + Carry; 1 4

5
Add two strings representing numbers + 8 87 42 9 1 63 5 Carry = 1 S1 = S2 = S3 = First iteration ( i=1 ): Carry = floor(n/10); 1 4

6
Add two strings representing numbers + 8 87 42 9 1 63 5 Carry = 1 S1 = S2 = S3 = First iteration ( i=1 ): tmp = char(mod(n,10)+'0'); 1 4 tmp

7
Add two strings representing numbers + 8 87 42 9 1 63 5 Carry = 1 S1 = S2 = S3 = First iteration ( i=1 ): S3 = [tmp S3]; 1 4 4

8
Add two strings representing numbers + 8 87 42 9 1 63 5 Carry = 1 S1 = S2 = S3 = Second iteration ( i=2 ): 4

9
Add two strings representing numbers + 8 87 42 9 1 63 5 Carry = 1 S1 = S2 = S3 = Second iteration ( i=2 ): n1 = S1(length(S1)+i-1)-'0'; 4

10
Add two strings representing numbers + 8 8 7 42 9 1 63 5 Carry = 1 S1 = S2 = S3 = Second iteration ( i=2 ): n2 = S2(length(S2)+i-1)-'0'; 4

11
Add two strings representing numbers + 8 8 7 42 9 1 63 5 Carry = 1 S1 = S2 = S3 = Second iteration ( i=2 ): n = n1 + n2 + Carry; 4 1 0

12
Add two strings representing numbers + 8 8 7 42 9 1 63 5 Carry = 1 S1 = S2 = S3 = Second iteration ( i=2 ): n = n1 + n2 + Carry; 4 1 0

13
Add two strings representing numbers + 8 8 7 42 9 1 63 5 Carry = 1 S1 = S2 = S3 = Second iteration ( i=2 ): Carry = floor(n/10); 4 1 0

14
Add two strings representing numbers + 8 8 7 42 9 1 63 5 Carry = 1 S1 = S2 = S3 = Second iteration ( i=2 ): tmp = char(mod(n,10)+'0'); 4 1 0 tmp

15
Add two strings representing numbers + 8 8 7 42 9 1 63 5 Carry = 1 S1 = S2 = S3 = Second iteration ( i=2 ): S3 = [tmp S3]; 4 1 0 0

16
Add two strings representing numbers + 8 87 42 9 1 63 5 Carry = 1 S1 = S2 = S3 = Third iteration ( i=3 ): 40

Similar presentations

Presentation is loading. Please wait....

OK

1 Presentation 37: STAIRWELL LENGTH AND HEADROOM.

1 Presentation 37: STAIRWELL LENGTH AND HEADROOM.

© 2018 SlidePlayer.com Inc.

All rights reserved.

To ensure the functioning of the site, we use **cookies**. We share information about your activities on the site with our partners and Google partners: social networks and companies engaged in advertising and web analytics. For more information, see the Privacy Policy and Google Privacy & Terms.
Your consent to our cookies if you continue to use this website.

Ads by Google

Ppt on marketing management by philip kotler Ppt on dry cell and wet cell batteries Ppt on ram and rom history Maldi ms ppt online Ppt on social media analytics Download ppt on biomass power plant Ppt on advanced construction materials and techniques Ppt on abo blood groupings Viewer ppt online student Ppt on gujarati culture