发布网友 发布时间:2022-04-22 04:39
共2个回答
热心网友 时间:2023-09-15 17:43
可以的,例如这样写:
if(s[i]>='A'&&s[i]<'X')
{
s[i]+=3;
}
else if(s[i]>='X'&&s[i]<='Z')
{
s[i]=s[i]-'X'+'A';
}
热心网友 时间:2023-09-15 17:43
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
}