GuiWuQi @ 2020-04-03 22:05:04
int main()
int n, i;
char s[100];
scanf("%d", &n);
getchar();
gets(s);
int len = strlen(s);
for(i = 0;i < len;i++)
{
s[i] = (s[i] - 'a' + n % 26) % 26 + 'a';
printf("%c", s[i]);
}
return 0;
}
by A_Pikachu @ 2020-04-03 22:06:41
望丰展?使MD。
by A_Pikachu @ 2020-04-03 22:07:46
这边建议用cin,cout呢
by GuiWuQi @ 2020-04-03 22:38:06
@zhuozhijie 好的,我去改改试试,感谢dalao
by GuiWuQi @ 2020-04-03 23:50:22
解决了,就是scanf和printf的问题