fall_2003_pset5

fall_2003_pset5 - Massachusetts Institute of Technology...

Info iconThis preview shows pages 1–4. 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

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: Massachusetts Institute of Technology Department of Aeronautics and Astronautics Cambridge, MA 02139 16.01/16.02 Unified Engineering I, II Fall 2003 Problem Set 5 Name: Due Date: 10/7/03 Time Spent (min) C11 C12 C13 S2 S3 S4 S5 S6 Study Time Announcements: Thermo Exam on Friday, 9am UNIFIED ENGINEERING Fall 2003 I. Kristina Lundqvist Problem C11. (Unified Computers and programming) 1. What is the output of the code fragment in Figure 1? 2. Write an Ada95 program to implement the Eulers 2 nd order integration method. Turn in a hard copy of your algorithm and code listing and an electronic copy of your code. 3. Write an Ada95 program to accept 10 numbers from the user and find the average of the numbers. Implement your code using the WHILE LOOP construct. Turn 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 UNIFIED ENGINEERING Fall 2003 I. Kristina Lundqvist Problem C12. (Unified Computers and programming) Problem C12....
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.

Page1 / 9

fall_2003_pset5 - Massachusetts Institute of Technology...

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

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