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