#include#include int main() { int x; printf("请输入要取余数的数字:"); scanf("%d", &x); x %= 20; printf("%dn", x); system("pause"); }
//当x<20时取余数多少都等于x 请输入要取余数的数字:19 19 请按任意键继续. . .
//当x=20时余数为0 请输入要取余数的数字:20 0 请按任意键继续. . .
//当x>20时除了20的倍数等于0,其余为(x-20)的本身 请输入要取余数的数字:30 10 请按任意键继续. . .



