#include <stdio.h>
float average(int n1, int n2, int n3);
float average(int n1, int n2, int n3) {
float a;
a = (float)(n1 + n2 + n3) / 3;
return a;
}
void main() {
int n1, n2, n3;
float a;
printf("请输入第一个整数;");
scanf("%d", &n1);
getchar();
printf("请输入第二个整数;");
scanf("%d", &n2);
getchar();
printf("请输入第三个整数;");
scanf("%d", &n3);
getchar();
a = average(n1, n2, n3);
printf("你所要的平均值是;%.2f", a);
}