#include <stdio.h>
void jiSuanqi(int num1,int num2,int *jia,int *jian,int *cheng,float *chu){
*jia = num1+num2;
*jian = num1-num2;
*cheng = num1*num2;
*chu = (float)num1/num2;
}
int main(){
int jia,jian,cheng;
float chu;
jiSuanqi(4,3,&jia,&jian,&cheng,&chu);
printf("%d----%d-----%d------%.2f\n",jia,jian,cheng,chu);
return 0;
}
随便写了下,希望对你有帮助 |