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