解题思路:
注意事项:
参考代码:
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
char a[] = new char[s.length()];
int n = 0;
for (int i = 0; i < s.length(); i++) {
a[n] = s.charAt(i);
if (a[n] >= 'a' && a[n] <= 'y')
a[n] = (char) (a[n] + 1);
if (a[n] == 'z')
a[n] = 'a';
n++;
}
for (int i = 0; i < n; i++) {
System.out.print(a[i]);
}
}
}
0.0分
0 人评分
【计算球体积】 (C语言代码)浏览:1158 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:468 |
C语言程序设计教程(第三版)课后习题5.6 (C语言代码)浏览:594 |
C二级辅导-公约公倍 (C语言代码)浏览:1325 |
C语言程序设计教程(第三版)课后习题6.7 (C语言代码)浏览:615 |
P1002 (C++代码)浏览:794 |
简单的a+b (Java代码)浏览:770 |
【回文数(二)】 (C语言代码)浏览:729 |
A+B for Input-Output Practice (II) (C++代码)浏览:656 |
Manchester- A+B for Input-Output Practice (IV)浏览:1178 |