fork download
  1. #include <stdio.h>
  2. void cal(int x, int y, int*sum, int *diff, int *mul, int *mod);
  3.  
  4. int main(void) {
  5. int n1,n2,su,di,mu,mo;
  6. printf("n1: n2:");
  7. scanf("%d %d",&n1,&n2);
  8. cal(n1,n2,&su,&di,&mu,&mo);
  9. printf("sum:%d diff:%d mul:%d mod:%d\n",su,di,mu,mo);
  10. return 0;
  11. }
  12.  
  13. void cal(int x, int y, int*sum, int *diff, int *mul, int *mod){
  14. *sum=x+ y;
  15. *diff=x - y;
  16. *mul=x * y;
  17. *mod=x / y;
  18. }
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
n1: n2:sum:2118180270 diff:2118114738 mul:844580000 mod:64644