import java.util.Scanner; public class Main { //题目给的不详细 以为是没有输入只有输出呢 其实有输入。 public static void main(String[] args) { Scanner sc=new Scanner(System.in); String s=sc.next(); System.out.println(EncryptChar(s)); } static String EncryptChar(String s){ String news=""; for (int i = 0; i < s.length(); i++) { char a=s.charAt(i); if(a>='A'&&a<='Y') news+=(char )(a+1); else if(a=='Z') news+='a'; else if(a>='a'&&a<='y') news+=(char)(a+1); else if(a=='z') news+='A'; else news+=a; } return news; } }
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:581 |
不容易系列 (C语言代码)浏览:666 |
输出正反三角形 (C语言代码)格式错误!!!浏览:1140 |
printf基础练习2 (C语言代码)浏览:741 |
校门外的树 (C语言代码)浏览:957 |
C语言训练-求1+2!+3!+...+N!的和 (C语言代码)浏览:786 |
C语言程序设计教程(第三版)课后习题3.7 (C语言代码)浏览:840 |
2005年春浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:582 |
杨辉三角 (C语言代码)浏览:484 |
剪刀石头布 (C++代码)浏览:1707 |