求哪位高手帮忙修改一下这个程序
#include <stdio.h>double f1(double x)
{
return (x*x);
}
double f2(double x,double y)
{
return (x*y);
}
void fun(int i,double x,double y)
{
if(i==1)
return double f1(x);
else
return double f2(x,y);
}
void main()
{
double x1=5,x2=3,r;
r=fun(1,x1,x2);
r+=fun(2,x1,x2)
printf("\nx1=%f,x1*x1+x1*x2=%f\n\n",x1,x2,r);
}