{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

fall_2003_pset5

fall_2003_pset5 - Massachusetts Institute of Technology...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
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
Image of page 1

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

View Full Document Right Arrow Icon
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 Euler’s 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
Image of page 2
UNIFIED ENGINEERING Fall 2003 I. Kristina Lundqvist Problem C12. (Unified Computers and programming) 1.
Image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern