#include<stdio.h>
void main()
{
void he(float a2,float b2,float c2);
void eva(float a3,float b3,float c3);
void ji(float a4,float b4,float c4);
float a,b,c,(*p)(float,float,float);int n;
printf("请输入三个整数\n");
scanf("%f,%f,%f",&a,&b,&c);
printf("输入1求和,输入2求平均数,输入3求乘积\n");
scanf("%d",&n);
switch (n)
{
case 1: p=he;break;
case 2: p=eva;break;
case 3: p=ji;break;
default :printf("error!!\n");
}
(*p)(a,b,c);
}
void he(float a2,float b2,float c2)
{
printf("%5.2f\n",a2+b2+c2);
}
void eva(float a3,float b3,float c3)
{
printf("%5.2f\n",(a3+b3+c3)/3);
}
void ji(float a4,float b4,float c4)
{
printf("%5.2f\n",a4*b4*c4);
}