#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)>0){
*diff=x-y;
}
else{
*diff=-(x-y);
}
*mul=x*y;
*mod=x/y;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGNhbChpbnQgeCwgaW50IHksIGludCAqc3VtLCBpbnQgKmRpZmYsIGludCAqbXVsLCBpbnQgKm1vZCk7CmludCBhYnMoaW50IGEpOwoKaW50IG1haW4odm9pZCl7CiAgICBpbnQgeCx5LHN1bSxkaWZmLG11bCxtb2Q7CiAgICBwcmludGYoIng6Iik7CiAgICBzY2FuZigiJWQiLCZ4KTsKICAgIHByaW50ZigieToiKTsKICAgIHNjYW5mKCIlZCIsJnkpOwogICAgCiAgICBjYWwoeCx5LCZzdW0sJmRpZmYsJm11bCwmbW9kKTsKICAgIAogICAgcHJpbnRmKCJzdW06JWQsZGlmZjolZCxtdWw6JWQsbW9kOiVkXG4iLHN1bSxkaWZmLG11bCxtb2QpOwoJcmV0dXJuIDA7Cn0KCnZvaWQgY2FsKGludCB4LCBpbnQgeSwgaW50ICpzdW0sIGludCAqZGlmZiwgaW50ICptdWwsIGludCAqbW9kKQp7CipzdW09eCt5OwppZigoeC15KT4wKXsKCSpkaWZmPXgteTsKCX0KZWxzZXsKCSpkaWZmPS0oeC15KTsKfQoqbXVsPXgqeTsKKm1vZD14L3k7Cn0KCgo=