字母金字塔:
public class Test001 { /*金字塔大写字母*/
public static void main(String[] args) {
char ch = 'A';
int n=20;
for(int i = 1;i <= n;i++){
if(i == 1){
for(int j = 1;j <= 2*(n - i) - 1;j++){
System.out.print(" ");
}
}else{
for(int j = 1;j <= 2*(n - i);j++){
System.out.print(" ");
}
}
if(i == 1){
System.out.print(ch);
}else{
for(int k = 1;k <=2*(i - 1);k++){
System.out.print(ch + " ");
}
}
System.out.println();
ch++;
}
}
}