You are on page 1of 1

Please Sit At Computer #

Computer Applications in Mechanical Engineering


Test #1.a - September 23, 199

Name: _____________________________________ Grading


Executes (50) ________
Student ID: ________________________________ Organization (20) ________
Comments (20) ________
Indention (10) ________

Building on the programs that you have already written, write a new program that:

1. Fills an array with twenty random numbers (name the


function/subroutine FillArray).
2. Prints the array before sorting (name the function/subroutine
PrintArray).
3. Sorts the array of numbers (name the function/subroutine SortArray).
4. Prints the array after sorting.
5. Calculates and prints the average of the numbers (name the
function/subroutine CalcAverage).

Each of these operations should be performed by a call to a function (subroutine)


from the main program. That is, the main program should define the variables and
make five calls to functions (subroutines).

You are NOT required to write to a file, writing to the screen is sufficient.
FORTRAN programmers are NOT required to use a common block.

Turn in your floppy. Name the program test1. Make sure your name is in the
program and on the floppy!

You might also like