Unformatted text preview: in a hard copy of your algorithm and code listing, and an electronic copy of your code. Hint : Compute the sum every time the user enters a number and the average outside the loop. Count := 1 ; for I in 1 .. 10 loop if I MOD 2 = 0 then for J in 1 .. 10 loop Count:= Count + 2 ; end loop ; else for J in 1 .. 5 loop Count := Count -1 ; end loop ; end if ; end loop ; Figure 1 . Code Fragment...
View Full Document
This note was uploaded on 01/28/2012 for the course AERO 16.01 taught by Professor Markdrela during the Fall '05 term at MIT.
- Fall '05