参考代码如下:#includevoid cal(float x, float y, float *a, float *b){*a=x*x+y*y;*b=x*x*x-y*y*y;}int main(){float a,b,x,y;scanf("%f%f",&x,&y);cal(x,y,&a,&b);printf("平方和为:%f\n",a);printf("立方差为:%f\n",b);return 0;}