Homework 1

Homework 1 - CS-105Lab EHomework 11.StepComputationWhat to...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS-105Lab EHomework 11.StepComputationWhat to do nextSetupPlace first number into list (L1) and the second number into list (L2). (Make sure numbers match in decimal places). Name the digit furthermost to the right and call it P. Set P = 1Continue with Step 11Let L1’s P = N and let L2’s P = MStep 22Add M and N, let the answer be Y*10^P. Place Y into the position P in A. If Y > 10, then (1 + P) *10^(P+1) and place only the ones digit from Y into PStep 33Now let P = P + 1.Step 44Add M and N to Y*10^(P)If there are more numbers in L1 and L2, go to Step 2. If not, output Y. STOP2. StepComputationWhat to do nextSetupPlace input into list (L)Continue with Step 11Call the position in the list P. Set P =1If there are more numbers in L, go to Step 2. Otherwise, output largest- STOP2P = P +1Set X equal to number located at position P...
View Full Document

This homework help was uploaded on 04/08/2008 for the course CS 105 taught by Professor Schwarz during the Spring '08 term at Stevens.

Page1 / 4

Homework 1 - CS-105Lab EHomework 11.StepComputationWhat to...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online