# hw4 - CS16 W11 UCSB LabHW4 Worth 50 of Lab04 score(50 total...

This preview shows pages 1–2. Sign up to view the full content.

CS16, W11, UCSB LabHW4: Worth 50% of Lab04 score (50 total points) Print this form, staple loose pages together, and write your answers on it. Accepted: on paper, at the *beginning* of *your* lab section on Thursday, February 3. Place on the front desk as you walk in, before getting seated. No email submission allowed. Name (2 pts): ______________________________________ Umail (2 pts): ______________________@umail.ucsb.edu Lab Section (2 pts) Circle one: 3:30 4:30 5:30 6:30 Read the rest of Etter Chapter 3, especially sections 3.4 (Loop Structures) and 3.6 (Data Files). You may skim through sections 3.7 and 3.8, but do learn about summation notation (p. 129) and carefully examine the program developed on pp. 133-136. Then answer the following items. 1. (24 pts; 8 pts each) Solve the following problem three different ways, by first applying a while loop, then a do/while loop, and finally a for loop. The problem is to find the sum of all integers from m through n. For example, if m is 4 and n is 7, this sum is 4+5+6+7 = 22. You may assume that m will always be

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 03/01/2011 for the course CMPSC 16 taught by Professor Costanzo during the Spring '11 term at UCSB.

### Page1 / 2

hw4 - CS16 W11 UCSB LabHW4 Worth 50 of Lab04 score(50 total...

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

View Full Document
Ask a homework question - tutors are online