- #include<stdio.h>
- void caculate(int a,int b,int *jia,int *jian,int *cheng,float *chu){
-
- *jia=a+b;
- *jian=a-b;
- *cheng=a*b;
- *chu=(float)a/b;
-
-
- }
- int main(){
-
- int a=34;
- int b=2;
- int jia;
- int jian;
- int cheng;
-
- float chu;
-
- caculate(34,2,&jia,&jian,&cheng,&chu);
-
- printf("%d\n",jia);
-
- return 0;
复制代码 |