#include <stdio.h>
float d_max(float x, float y, float z);
float d_min(float x, float y, float z);
float d_aver(float x, float y, float z);
void main()
{
float x, y, z;
printf("please input three numbers:");
scanf("%f%f%f", &x, &y, &z);
printf("max number is:%f\n", d_max(x, y, z));
printf("min number is:%f\n", d_min(x, y, z));
printf("average is:%f\n", d_aver(x, y, z));
}
float d_max(float x, float y, float z)
{
float t;
if (x < y) t = y;
else t = x;
if (t < z) t = z;
return t;
}
float d_min(float x, float y, float z)
{
float t;
if (x > y) t = y;
else t = x;
if (t > z) t = z;
return t;
}
float d_aver(float x, float y, float z)
{
return ((x + y + z) / 3);
}