#include <stdio.h>
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;
}
int main(void) {
int x,y,sum,diff,mul,mod;
x=1;
y=3;
cal(x,y,&sum,&diff,&mul,&mod);
printf("和は%d、差は%d、積は%d、商は%dである\n",sum
,diff
,mul
,mod
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGNhbChpbnQgeCwgaW50IHksIGludCAqc3VtLCBpbnQgKmRpZmYsIGludCAqbXVsLCBpbnQgKm1vZCkKCXsKCgkqc3VtID0geCt5OwoJaWYoeD55KSB7CgkJKmRpZmYgPSB4LXk7Cgl9CgllbHNlIHsKCQkqZGlmZiA9IHkteDsKCX0KCSptdWwgPSB4Knk7CgkqbW9kID0geC95OwoJCgl9CgppbnQgbWFpbih2b2lkKSB7CgkKCWludCB4LHksc3VtLGRpZmYsbXVsLG1vZDsKCQoJeD0xOwoJeT0zOwoJCgljYWwoeCx5LCZzdW0sJmRpZmYsJm11bCwmbW9kKTsKCQoJcHJpbnRmKCLlkozjga8lZOOAgeW3ruOBryVk44CB56mN44GvJWTjgIHllYbjga8lZOOBp+OBguOCi1xuIixzdW0sZGlmZixtdWwsbW9kKTsKCQoJcmV0dXJuIDA7Cn0=