/********************************************************************* File: average.c ********************************************************************** Author: Sandy Beach Class: Boston University CAS CS 113 Assignment: 1.17 (exercise 99 on page 789 of KP) Due Date: February 30, 1996 ********************************************************************** Usage: average a b Inputs: two floating point numbers "a" and "b" Outputs: floating point average of "a" and "b" to standard output Description: This is a program that computes the average of two numbers. Algorithm: average = (a + b)/2 ********************************************************************** Errors: 1. User fails to enter two numbers. Error message: "Usage: average \n" Error action: Program exits without computing average 2. User enters more than two numbers. Error message: "User entered more than two numbers.\n" Computing average for first two numbers only\n" Error action: Program prints average of first two numbers. ********************************************************************** Other Comments: This routine could be enhanced so that it could take any quantity of numbers. This could be done by first inspecting the argument count "argc" passed into the main() routine. *********************************************************************/