提交时间:2024-11-01 15:53:15
运行 ID: 54980
#include<iostream> #include<cstring> using namespace std; int main() { char s1[85]; gets(s1); int a=strlen(s1); for(int i=0;i<a;i++){ int b=s1[i]; if('a'<=b&&b<'z'){ cout<<char(s1[i]+1); } else if(b=='z'){ cout<<"a"; } else if(b=='Z'){ cout<<"A"; } else if('A'<=b&&b<'Z'){ cout<<char(s1[i]+1); } else{ cout<<s1[i]; } } return 0; }