没错,你没看错,就是easy.....
#include <stdio.h>
void yunSuan(int *sum,int *cha,int *cheng,float *chu,int m,int n);
int main()
{
int sum;
int cha;
int cheng;
float chu;
int m = 2;
int n = 4;
//调用的函数
yunSuan(&sum,&cha,&cheng,&chu,m,n);
printf("sum=%d,cha=%d,cheng=%d,chu=%f\n",sum,cha,cheng,chu);
return 0;
}
void yunSuan(int *sum,int *cha,int *cheng,float *chu,int m,int n)
{
*sum = m + n;
*cha = m - n;
*cheng = m * n;
*chu = (float)m / n;
} |
|