#include <bits/stdc++.h> using namespace std; int main(){ char x[301]; cin.getline(x,301); int w=0; for(w=0;x[w]!='\0';w++)

root  •  1年前


include <bits/stdc++.h>

using namespace std; int main(){

char x[301];
cin.getline(x,301);
int w=0;
for(w=0;x[w]!='\0';w++)
{
	
}
int j=0;
char a[301];
for(int i=0;i<w;i++){
	int b;
	b=x[i];
	if(b<65||b>90&&b<97||b>122){
		a[j++]=x[i];
	}
	else
	if(x[i]=='a'){
		a[j++]='y';
	}
	else
	if(x[i]=='A'){
		a[j++]='Y';
	}
	else
	if(x[i]=='b'){
		a[j++]='z';
	}
	else
	if(x[i]=='B'){
		a[j++]='Z';
	}	
	else
	{
		char f;
		b-=2;
		f=b;
		a[j++]=f;
	}
}
for(int i=0;i<j;i++)
cout<<a[i];
return 0;
return 0;

}


评论:

请先登录,才能进行评论