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