参考代码:
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); char []s = scanner.nextLine().toCharArray(); for(int i = 0; i < s.length; i++) if(s[i]>= 'a' && s[i] <= 'z' - 1) s[i] += 1; else if(s[i] == 'z') s[i] = 'a'; System.out.print(s); } }
0.0分
4 人评分