next up previous
Next: About this document

centering17

The weight in pounds of a walleye (a species of freshwater fish) can be calculated from its length and girth in inches according to the following formula:

displaymath33

where scalefactor is constant and equal to 800. Using the vi editor, write a C program on the Sun cluster that:

Hints: you can copy or ftp the file prog1.c from the pub subdirectory of my home directory. This file contains a template with comments sugggesting where to put various parts of your program. If you don't use this template, you will need to have the line:

#include <stdio.h>
in your program before the line:
  main() {

A test case: a walleye with a length of 32 inches and a girth of 19.5 inches should weigh 15.21 pounds.

Either turn in a print out of your program, or email it to me at wahls@psu.edu. If you email me the program, I will email you an acknowledgement when I receive it, and will email you again with your score and comments after the due date. Your program will be graded on correctness and appropriate use of comments.



next up previous
Next: About this document

Tim Wahls
Wed Jan 22 15:12:25 EST 1997