I public class PutPasswordDemo {
void PutPassword0{
String input = null;
Scanner sc = new Scanner(System.in);
System.out.println("请输入字母: ");
input=sc.next();
StringBuffer code = new StringBuffer();
Scanner sc1=new Scanner(System.in);
for(inti= 0;i < input.length0;i+ +)
{
char х = input.charAt(i);
if(x >= ‘a’ &&x <= ‘w’)
{
X= (char)(x+3);
code.append(x);
}
if(x>= ‘x’ &&x<= ‘z’)
{
x=(char)(x-23);
code.append(x);
}
if(x >= ‘A’ &&x <= ‘W’)
{
X= (char) (х+3);
code.append(x);
}
if(x>= ‘X’ &&x <= ‘Z’)
{
x=(char)(x-23);
code.append(x);
}
java语言实现移位密码加密过程
最新推荐文章于 2023-09-13 18:08:00 发布