#include
int main()
{
char a[300];
int n,i;
scanf("%d",&n);
scanf("%s",a);
for(i=0;i
if(a[i]>='A'&&a[i]<='Z')//大写 {
a[i]=((a[i]-65+n)%26)+65;//取模,+65 }
else //小写 {
a[i]=((a[i]-97+n)%26)+97;
}
}
puts(a);
return 0;
}
www.cnblogs.com/geek-007/p/4304401.html