#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("%d, %d, %d, %d, %d, %d",x
, y
, 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 *diff=y-x;
*mul=x*y;
*mod=x%y;
}
CiNpbmNsdWRlIDxzdGRpby5oPgoKdm9pZCBjYWwoaW50IHgsIGludCB5LCBpbnQgKnN1bSwgaW50ICpkaWZmLCBpbnQgKm11bCwgaW50ICptb2QpOwoKaW50IG1haW4odm9pZCkgewoJaW50IHgsIHksIHN1bSwgZGlmZiwgbXVsLCBtb2Q7CglzY2FuZigiJWQsJWQiLCZ4LCZ5KTsKCQoJY2FsKHgsIHksICZzdW0sICZkaWZmLCAmbXVsLCAmbW9kKTsKCQoJcHJpbnRmKCIlZCwgJWQsICVkLCAlZCwgJWQsICVkIix4LCB5LCBzdW0sIGRpZmYsIG11bCwgbW9kKTsKCQoJcmV0dXJuIDA7Cn0KCnZvaWQgY2FsKGludCB4LCBpbnQgeSwgaW50ICpzdW0sIGludCAqZGlmZiwgaW50ICptdWwsIGludCAqbW9kKQp7Cgkqc3VtPXgreTsKCWlmKHg+PXkpewoJCSpkaWZmPXgteTt9CgllbHNlICpkaWZmPXkteDsKCSptdWw9eCp5OwoJKm1vZD14JXk7CgkKfQ==