public static void main(String args[])
throws Exception{
String s=args[0];
int key=Integer.pareseInt(args[1]);
String es="";
for(int i=0;i
if(c>=`a` && c<=`z`) //是小写字母
( c+=key%26; //移动key%26位
if(c<`a`) c+=26; //向左超界
if(c>`z`) c-=26; //向右超界
}
else if(c>=`A` && c<=`Z`) //是大写字母
( c+=key%26;
if(c<`A`) c+=26;
if(c>`Z`) c-=26;
}
es+=c;
}
System.out.println(es);
}
这个是我写的代码,把它写的编程软件上就OK了。
我也不会啊!我也有道题是这个,我还想问你呢!