#include <stdio.h>
void cal(int x,int y,int *sum,int *diff,int *mul,int *mod);
int main(void) {
int x,y,a,b,c,d;
cal(x,y,&a,&b,&c,&d);
printf("sum:%d dihh:%d mul:%d mod:%d/n",a
,b
,c
,d
);
return 0;
}
void cal(int x,int y,int *sum,int *diff,int *mul,int *mod)
{
*sum= x+y;
if(x<y){
*diff= y-x;
}
else{
*diff=x-y;
}
*mul= x*y;
*mod= x/y;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CnZvaWQgY2FsKGludCB4LGludCB5LGludCAqc3VtLGludCAqZGlmZixpbnQgKm11bCxpbnQgKm1vZCk7CgppbnQgbWFpbih2b2lkKSB7CiBpbnQgeCx5LGEsYixjLGQ7CiBwcmludGYoInggOiAiKTsgc2NhbmYoIiVkIiwmeCk7CiBwcmludGYoInkgOiAiKTsgc2NhbmYoIiVkIiwmeSk7CiBjYWwoeCx5LCZhLCZiLCZjLCZkKTsKIHByaW50Zigic3VtOiVkIGRpaGg6JWQgbXVsOiVkIG1vZDolZC9uIixhLGIsYyxkKTsKCiByZXR1cm4gMDsKfQp2b2lkIGNhbChpbnQgeCxpbnQgeSxpbnQgKnN1bSxpbnQgKmRpZmYsaW50ICptdWwsaW50ICptb2QpCnsKICAqc3VtPSB4K3k7CiAgaWYoeDx5KXsKICAqZGlmZj0geS14OwogIH0KICBlbHNlewogICpkaWZmPXgteTsKICB9CiAgKm11bD0geCp5OwogICptb2Q9IHgveTsKfQ==