UMBC CS 201, Spring 02
UMBC CMSC 201 Spring '02 CSEE | 201 | 201 S'02 | lectures | news | help

/******************************************** * File: findstats.c * Author: S. Bogar * Date: 8/3/99 * Section 101 * SSN: 123-45-6789 * EMail: bogar@cs.umbc.edu * * This file uses functions from a separately * compiled object file. *********************************************/ #include <stdio.h> /* stats.h contains function prototypes */ #include "stats.h" int main () { int a, b ; /* get two ints from user */ printf("Enter first number: ") ; scanf ("%d", &a) ; printf("Enter second number: ") ; scanf ("%d", &b) ; printf("\n") ; /* call arithmetic functions and print results */ printf("The sum of %d and %d is: %d\n", a, b, Sum (a, b) ) ; printf("The smaller of %d and %d is: %d\n", a, b, Min (a, b) ) ; printf("The larger of %d and %d is: %d\n", a, b, Max (a, b) ) ; printf("The average of %d and %d is: %f\n", a, b, Avg (a, b) ) ; printf("The distance between %d and %d is: %d\n", a, b, Dist (a, b) ) ; /* we're done !! */ printf("That's all folks.\n") ; return 0; } [an error occurred while processing this directive]
Thursday, 17-Jan-2002 13:52:05 EST