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