linyiyi123456 @ 2023-02-22 21:56:46
#include<stdio.h>
#include<string.h>
int main()
{
char a[100];
char ch;
int i,n,num;
scanf("%d",&n);
scanf("%s",a);
n=n%26;
for(i=0;i<strlen(a);i++)
{
ch=a[i];
if(ch+n>'z')
{
ch='z'-26+n;
}
else
{
ch+=n;
}
printf("%c",ch);
}
return 0;
}
by endline_n @ 2023-02-22 21:59:35
ch='z'-26+n;
应该是这句的问题
by linyiyi123456 @ 2023-02-22 23:18:59
@guhaochen233 请问一下要怎么改呢
by endline_n @ 2023-02-23 20:03:58
我就提示一下:式子要用到ch
by ajie666 @ 2023-03-26 01:04:04
你改出来吗,我的问题跟你的差不多