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