fork download
  1. #include <stdio.h>
  2. void call(int x,int y,int *add, int *dif);
  3. int main(void) {
  4. int n1,n2,a,b;
  5. scanf("%d",&n1);
  6. scanf("%d",&n2);
  7. call(n1,n2,&a,&b);
  8. printf("add=%d,dif=%d\n",a,b);
  9. return 0;
  10. }
  11. call(int x,int y,int *add, int *dif){
  12. *add=x+y;
  13. *dif=x-y;
  14. }
  15.  
Success #stdin #stdout 0s 5288KB
stdin
2 3
stdout
add=5,dif=-1