作者在 2020-03-07 23:36:21 发布以下内容
char c1[11]{};//缘由https://bbs.bccn.net/redirect.php?tid=499626&goto=lastpost#lastpost
int j = 0, t = 4;
printf("输入位数、字符串:");
scanf_s("%d", &t);
while (scanf_s("%c", &c1[j]))if (c1[j] == '\n')break; else c1[j] = ((c1[j++] - '0') + t) + '0';
j = 1; while ((c1[j] - '\0') != '\n')printf("%c", c1[j++]);