#include <stdio.h>
void cal(int x,int y,int *sum,int *diff,int *mul,int *mod);
int main(void) {
// your code goes here
int x=2, y=5, s, d, mu, mo;
cal(x,y,&s,&d,&mu,&mo);
printf("*sum:%d *diff:%d *mul:%d *mod:%d",s
,d
,mu
,mo
); return 0;
}
void cal(int x,int y,int *sum,int *diff,int *mul,int *mod){
*sum=x+y;
*diff=x-y;
if(*diff<0){
*diff=-*diff;
}
*mul=x*y;
*mod=x/y;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CnZvaWQgY2FsKGludCB4LGludCB5LGludCAqc3VtLGludCAqZGlmZixpbnQgKm11bCxpbnQgKm1vZCk7CgppbnQgbWFpbih2b2lkKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglpbnQgeD0yLCB5PTUsIHMsIGQsIG11LCBtbzsKCXByaW50ZigieCA6ICVkICIseCk7CglwcmludGYoInkgOiAlZFxuIix5KTsKCWNhbCh4LHksJnMsJmQsJm11LCZtbyk7CgkKCXByaW50ZigiKnN1bTolZCAqZGlmZjolZCAqbXVsOiVkICptb2Q6JWQiLHMsZCxtdSxtbyk7CglyZXR1cm4gMDsKfQogdm9pZCBjYWwoaW50IHgsaW50IHksaW50ICpzdW0saW50ICpkaWZmLGludCAqbXVsLGludCAqbW9kKXsKIAkqc3VtPXgreTsKIAkqZGlmZj14LXk7CiAJaWYoKmRpZmY8MCl7CiAJCSpkaWZmPS0qZGlmZjsKIAl9CiAJKm11bD14Knk7CiAJKm1vZD14L3k7CiB9CiAK