import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner input = new Scanner(System.in); int n; n = input.nextInt(); String a = "A"; for(int i=1;i<n;i++){ int b = ‘A‘+i; a = a + (char)b + a; } System.out.println(a); } }
原文:http://www.cnblogs.com/lolybj/p/6498102.html