#include
#include
int main() {
int i;
char s[80];
printf("请输入字符串:");
while(scanf("%s",s) == 1) {
printf("加密前:%s\n",s);
i = 0;
while(s[i]) {
if(s[i] >= 'A' && s[i] <= 'Z')
s[i] = (s[i] - 'A' + 3)%26 + 'A';
else if(s[i] >= 'a' && s[i] <= 'z')
s[i] = (s[i] - 'a' + 3)%26 + 'a';
++i;
}
printf("加密后:%s\n",s);
printf("请输入字符串[
}
return 0;
}