Sorry! We could not find what you were looking for
Try going back to the main page here
findstats.c
/********************************************
* File: findstats.c
* Author: S. Bogar
* Date: 8/3/99
* Section 101
* EMail: bogar@cs.umbc.edu
*
* This file contains the main program which gets two
* integers from the user and then reports statistics
* about these integers.
*
* This file makes use of functions found in 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]
Tuesday, 20-Sep-2005 14:04:12 EDT