#include
int add(int a, int b)
{
return a+b;
}
int sub(int a, int b)
{
return a-b;
}
int mul(int a,int b)
{
return a*b;
}
int process(int (*fun)(int,int), int a, int b)
{
return fun(a,b);
}
int main()
{
int a,b,r;
printf("输入a、b两数:n");
scanf("%d%d",&a,&b);
printf("两数之和:%dn", process(add,a,b));
printf("两数之差:%dn", process(sub,a,b));
printf("两数之积:%dn", process(mul,a,b));
}