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