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