不知道哪里错了,求指教
程序代码:
#include <stdio.h> int main() { float op1,op2,*psum,*pdiff; void sum_diff(float op1,float op2,float *psum,float *pdiff); printf("输入两个数:"); scanf("%d%d",&op1,&op2); sum_diff(op1,op2,*psum,*pdiff); // cannot convert parameter 3 from 'float' to 'float *' printf("%f+%f=%f",op1,op2,*psum); printf("%f-%f=%f",op1,op2,*pdiff); return 0; } void sum_diff(float op1,float op2,float *psum,float *pdiff) { *psum=op1+op2; *pdiff=op1-op2; }