da表哥 @ 2020-02-22 13:24:17
#include<stdio.h>
#include<string.h>
int main()
{
int n,i;
char a[55];
scanf("%d",&n);
getchar();
gets(a);
for(i=0;i<strlen(a);i++)
printf("%c",a[i]+n%26);
return 0;
}
by 594wyx @ 2020-02-22 13:48:58
gets(a)?
by 594wyx @ 2020-02-22 13:54:47
我谔谔
by da表哥 @ 2020-02-22 14:20:23
@594wyx 吃回车的,不用这个输入数字就结束了。。。
by da表哥 @ 2020-02-22 14:21:55
@H6_6Q 输入的字母没有变呀,a+1不就是b嘛?
by da表哥 @ 2020-02-22 14:22:46
@594wyx 我这是c。。。
by 594wyx @ 2020-02-22 15:10:05
我······
谔谔谔谔谔谔谔谔谔谔谔谔······
by H6_6Q @ 2020-02-22 16:01:08
@da表哥
你%26,如果z+1的话%26就是(122+1)%26=19
by da表哥 @ 2020-02-22 16:26:59
@H6_6Q 哦对,好像是