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