#include <stdio.h>
void cal(int x, int y, int *sum, int *diff, int *mul, int *mod);
int main() {
int x, y;
int sum, diff, mul, mod;
cal(x, y, &sum, &diff, &mul, &mod);
printf("|x - y| = %d\n", diff
);
return 0;
}
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;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGNhbChpbnQgeCwgaW50IHksIGludCAqc3VtLCBpbnQgKmRpZmYsIGludCAqbXVsLCBpbnQgKm1vZCk7CgppbnQgbWFpbigpIHsKICAgIGludCB4LCB5OwogICAgaW50IHN1bSwgZGlmZiwgbXVsLCBtb2Q7CiAKICAgIHByaW50ZigieCDjgaggeSDjgpLlhaXlipvjgZfjgabjgY/jgaDjgZXjgYQ6ICIpOwogICAgc2NhbmYoIiVkICVkIiwgJngsICZ5KTsKICAgIGNhbCh4LCB5LCAmc3VtLCAmZGlmZiwgJm11bCwgJm1vZCk7CiAgICAKICAgIHByaW50ZigieCArIHkgPSAlZFxuIiwgc3VtKTsKICAgIHByaW50ZigifHggLSB5fCA9ICVkXG4iLCBkaWZmKTsKICAgIHByaW50ZigieCAqIHkgPSAlZFxuIiwgbXVsKTsKICAgIHByaW50ZigieCAvIHkgPSAlZFxuIiwgbW9kKTsKICAgIAogICAgcmV0dXJuIDA7Cn0Kdm9pZCBjYWwoaW50IHgsIGludCB5LCBpbnQgKnN1bSwgaW50ICpkaWZmLCBpbnQgKm11bCwgaW50ICptb2QpIHsKICAgICpzdW0gPSB4ICsgeTsKICAgICpkaWZmID0gKHggPiB5KSA/ICh4IC0geSkgOiAoeSAtIHgpOwogICAgKm11bCA9IHggKiB5OwogICAgICptb2QgPSB4IC8geTsgIAp9