previous3 - S Karaki American University of Beirut May 8...

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

View Full Document Right Arrow Icon
S. Karaki American University of Beirut May 8, 2003 Department of Electrical and Computer Engineering EECE 230 - Section 3: Quiz # 2 (Duration 2 Hours) Purpose: To test your ability in writing programs to solve simple problems using arrays and functions. 1. Write a program to read an array of real numbers and to calculate the maximum, and average of these numbers, and then to print the results. Develop your program using several functions specified as follows. There should be one function to read up to a maximum number of data items and store them in an array. This function should return the number of data items actually read as one of its parameters. The data items should be terminated by a sentinel. The second and third functions should calculate the maximum and average of the data stored in the array, respectively. The final function would receive the data stored in an array passed as a parameter and would issue the function calls to calculate the required quantities and print the results. 2.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/26/2010 for the course EECE 230 taught by Professor Samikaraki during the Fall '07 term at American University of Beirut.

Ask a homework question - tutors are online