Exam 2 - Sample Algorithm

Exam 2 - Sample Algorithm - Step 5 sum = sum i Step 6 I = I...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Step 1: START Step 2: Input total qty of numbers to add up to, call it n Step 3: Let I be the incrementing variable Step 4: Let sum be the sum of all numbers from 1 to n
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Step 5: sum = sum + i Step 6: I = I + 1 Step 7: if I <=n, go to step 5 Step 8: print sum Step 9: END...
View Full Document

This note was uploaded on 02/08/2011 for the course COMP APPS 198 taught by Professor Stout during the Spring '10 term at Rutgers.

Ask a homework question - tutors are online