shaoxing @ 2021-03-31 18:39:42
#include<stdio.h>
#include<string.h>
int main()
{
char a[50];
int i,n;
scanf("%d",&n);
printf("\n");
scanf("%s",&a);
for(i=0;a[i]!='\0';i++)
{
if(a[i]>='a' && a[i]<='z'-n)
a[i]=a[i]+n;
else
{
a[i]=a[i]-26+n;
}
}
printf("%s\n",a);
return 0;
}
by Withers @ 2021-03-31 18:41:57
有可能减不止一个26
by shaoxing @ 2021-03-31 18:57:43
@xiaxiakeji 我知道了 ,多写了个printf,谢谢;