#include <stdio.h>
void suanShu(int a,int b,int *c1,int *d1,int *e1,int *f1);
int main(){
int a,b,c,d,e,f;
printf("请输入两个整数用逗号隔开\n");
scanf("%d,%d",&a,&b);
int *c1=&c,*d1=&d,*e1=&e,*f1=&f;
suanShu(a,b,c1,d1,e1,f1);
printf("两个数的和=%d,两个数的差=%d,两个数的积=%d,两个数的商=%d\n",c,d,e,f);
return 0;
}
void suanShu(int a,int b,int *c1,int *d1,int *e1,int *f1){
*c1=a+b;
*d1=a-b;
*e1=a*b;
*f1=a/b;
} |