#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;
if(y!=0){
*mod=x/y;
}
}
int main(){
int x,y;
int sum,diff,mul,mod;
cal(x,y,&sum,&diff,&mul,&mod);
printf("課題1\nx+y=%d\nx-y=%d\nx*y=%d\nx/y=%d",sum
,diff
,mul
,mod
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGNhbChpbnQgeCxpbnQgeSxpbnQgKnN1bSxpbnQgKmRpZmYsaW50ICptdWwsaW50ICptb2QpIHsKCSpzdW09eCt5OwoJaWYoeD55KXsKCQkqZGlmZj14LXk7Cgl9CgllbHNlewoJCSpkaWZmPXkteDsKCX0KCSptdWw9eCp5OwoJaWYoeSE9MCl7CgkJKm1vZD14L3k7Cgl9Cn0KCmludCBtYWluKCl7CglpbnQgeCx5OwoJaW50IHN1bSxkaWZmLG11bCxtb2Q7CglzY2FuZigiJWQgJWQiLCZ4LCZ5KTsKCWNhbCh4LHksJnN1bSwmZGlmZiwmbXVsLCZtb2QpOwoJcHJpbnRmKCLoqrLpoYzvvJFcbngreT0lZFxueC15PSVkXG54Knk9JWRcbngveT0lZCIsc3VtLGRpZmYsbXVsLG1vZCk7CglyZXR1cm4gMDsKfQoJCgo=