#include <stdio.h>
#define MOD 11//即自己按照题意定义
int main()
{
int a, b, s;
while(~scanf("%d%d", &a, &b))
{
s = (a + b) % MOD;
printf("%d\n", s);
}
return 0;
}
宏定义练习:模(常)数
最新推荐文章于 2024-05-17 19:34:58 发布
#include <stdio.h>
#define MOD 11//即自己按照题意定义
int main()
{
int a, b, s;
while(~scanf("%d%d", &a, &b))
{
s = (a + b) % MOD;
printf("%d\n", s);
}
return 0;
}