#include <stdio.h>
void cal(int x,int y,int *sum, int *diff, int *mul, int *mod);
int main(void) {
int x,y,a,b,c,d;
cal(x,y,&a,&b,&c,&d);
printf("sum:%d,diff:%d,mul:%d,mod:%d",a
,b
,c
,d
); return 0;
}
void cal(int x,int y,int *sum, int *diff, int *mul, int *mod){
*sum=x+y;
*diff=x-y;
*mul=x*y;
*mod=x/y;
if(*diff<0){
*diff=-*diff;
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CnZvaWQgY2FsKGludCB4LGludCB5LGludCAqc3VtLCBpbnQgKmRpZmYsIGludCAqbXVsLCBpbnQgKm1vZCk7CgppbnQgbWFpbih2b2lkKSB7CglpbnQgeCx5LGEsYixjLGQ7CglzY2FuZigiJWQiLCZ4KTsKCXNjYW5mKCIlZCIsJnkpOwoJY2FsKHgseSwmYSwmYiwmYywmZCk7CglwcmludGYoInN1bTolZCxkaWZmOiVkLG11bDolZCxtb2Q6JWQiLGEsYixjLGQpOwoJcmV0dXJuIDA7Cn0Kdm9pZCBjYWwoaW50IHgsaW50IHksaW50ICpzdW0sIGludCAqZGlmZiwgaW50ICptdWwsIGludCAqbW9kKXsKCSpzdW09eCt5OwoJKmRpZmY9eC15OwoJKm11bD14Knk7CgkqbW9kPXgveTsKCWlmKCpkaWZmPDApewoJCSpkaWZmPS0qZGlmZjsKCX0KfQo=