对一个单词进行加密操作,在ASCII表中偏移量为3
import java.util.*;
public class zuoye9_27 {
public static void main(String[] args)
{
String str;
int i=0;
char temp;
Scanner reader=new Scanner(System.in);
str=reader.nextLine();
char[] password=str.toCharArray();
while(i<password.length)
{
temp=++password[i];
password[i]=++temp;
password[i]++;
i++;
}
for(char chu:password)
System.out.print(chu);
}
}
输入
AtdcLC
输出