#include <stdlib.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 = 2;
int y = 5;
int sum, diff, mul, mod;
cal(x, y, &sum, &diff, &mul, &mod);
printf("x = %d, y = %d\n", x
,y
);
return 0;
}
I2luY2x1ZGUgPHN0ZGxpYi5oPgoKdm9pZCBjYWwoaW50IHgsIGludCB5LCBpbnQgKnN1bSwgaW50ICpkaWZmLCBpbnQgKm11bCwgaW50ICptb2QpIHsKCSpzdW0gPSB4ICsgeTsKCSpkaWZmID0gKHg+eSk/eC15OnkteDsKCSptdWwgPSB4ICogeTsKCSptb2QgPSB4IC8geTsKfQoKaW50IG1haW4oKSB7CglpbnQgeCA9IDI7CglpbnQgeSA9IDU7CglpbnQgc3VtLCBkaWZmLCBtdWwsIG1vZDsKCgljYWwoeCwgeSwgJnN1bSwgJmRpZmYsICZtdWwsICZtb2QpOwoKCXByaW50ZigieCA9ICVkLCB5ID0gJWRcbiIsIHgseSk7CiAgICBwcmludGYoInjjgah544Gu5ZKM44GvOiAlZFxuIiwgc3VtKTsKICAgIHByaW50ZigieOOBqHnjga7lt67jga86ICVkXG4iLCBkaWZmKTsKICAgIHByaW50ZigieOOBqHnjga7nqY3jga86ICVkXG4iLCBtdWwpOwogICAgcHJpbnRmKCJ444GoeeOBruWVhuOBrzogJWRcbiIsIG1vZCk7CgogICAgcmV0dXJuIDA7Cn0=