#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;
*diff=(x>y)?(x-y):(y-x);
*mul=x*y;
*mod=x%y;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CnZvaWQgY2FsKGludCB4LGludCB5LGludCAqc3VtLGludCAqZGlmZixpbnQgKm11bCxpbnQgKm1vZCk7CgppbnQgbWFpbih2b2lkKSB7CglpbnQgeCx5LHN1bSxkaWZmLG11bCxtb2Q7CglwcmludGYoIng6Iik7CglzY2FuZigiJWQiLCZ4KTsKCXByaW50ZigieToiKTsKCXNjYW5mKCIlZCIsJnkpOwoJCgljYWwoeCx5LCZzdW0sJmRpZmYsJm11bCwmbW9kKTsKCXByaW50Zigic3VtOiVkIGRpZmY6JWQgbXVsOiVkIG1vZDolZFxuIixzdW0sZGlmZixtdWwsbW9kKTsKCXJldHVybiAwOwp9Cgp2b2lkIGNhbChpbnQgeCxpbnQgeSxpbnQgKnN1bSxpbnQgKmRpZmYsaW50ICptdWwsaW50ICptb2QpewoJCgkqc3VtPXgreTsKCSpkaWZmPSh4PnkpPyh4LXkpOih5LXgpOwoJKm11bD14Knk7CgkqbW9kPXgleTsKCQp9