pastebin

Paste Search Dynamic
Recent pastes
cal
  1. #include<stdio.h>
  2. void cal(int x,int y,int *add,int *sub);
  3. int main(void){
  4.  
  5. int n1,n2,a,d;
  6. printf("n1:");scanf("%d",&n1);
  7. printf("n2;");scanf("%d",&n2);
  8.  
  9. cal(n1,n2,&a,&d);
  10.  
  11. printf("add:%d sub:%dn",a,d);
  12.  
  13. return 0;
  14. }
  15.  
  16. void cal(int x,int y,int *add,int *sub){
  17. *add=x+y;
  18. *sub=x-y;
  19. }
Parsed in 0.005 seconds