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