#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, y, sum, diff, mul, mod;
x = 4;
y = 2;
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+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCnZvaWQgY2FsKGludCB4LCBpbnQgeSwgaW50ICpzdW0sIGludCAqZGlmZiwgaW50ICptdWwsIGludCAqbW9kKTsKCmludCBtYWluKHZvaWQpIHsKICAgIGludCB4LCB5LCBzdW0sIGRpZmYsIG11bCwgbW9kOwogICAgCiAgICB4ID0gNDsKICAgIHkgPSAyOwogICAgCiAgICBjYWwoeCwgeSwgJnN1bSwgJmRpZmYsICZtdWwsICZtb2QpOwogICAgCiAgICBwcmludGYoInggPSAlZCwgeSA9ICVkXG4iLCB4LCB5KTsKICAgIHByaW50Zigic3VtID0gJWRcbiIsIHN1bSk7CiAgICBwcmludGYoImRpZmYgPSAlZFxuIiwgZGlmZik7CiAgICBwcmludGYoIm11bCA9ICVkXG4iLCBtdWwpOwogICAgcHJpbnRmKCJtb2QgPSAlZFxuIiwgbW9kKTsKICAgIAogICAgcmV0dXJuIDA7Cn0KCnZvaWQgY2FsKGludCB4LCBpbnQgeSwgaW50ICpzdW0sIGludCAqZGlmZiwgaW50ICptdWwsIGludCAqbW9kKSB7CiAgICAqc3VtID0geCArIHk7CiAgICAqZGlmZiA9IGFicyh4IC0geSk7IAogICAgKm11bCA9IHggKiB5OwogICAgKm1vZCA9IHggLyB5OyAKfQ==