Modularity with subprograms

This assignment tests your ability to create your own subprograms.

Begin by studying our note on achieving program modularity by writing subprograms.

Write a subprogram that computes the area of a rectangle, and use it in an area program. Your subprogram should have two single-precision arguments, height and width, and leave the result in a single-precision global variable. When it is working, print a screen shot showing the area of a 112 by 207 rectangle and a listing of all your code.


Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.