可以的,例如这样写:
if(s[i]>='A'&&s[i]<'X')
{
s[i]+=3;
}
else if(s[i]>竖缓='数州X'&&s[i]<='Z')
{
s[i]=s[i]-'X'余毕模+'A';
}
if(e>='A'&&e<='W') //e stands for 颤稿character being encrypted
茄耐孝 e+=3;
else if(e>='X'&&e<='Z')
e-=23;
else
{
亩念 ... //do not encrypt or do something else
}