Java程序
用Java编写程序,在屏幕中输出下列图形。
public class traling {
public static void main(String[] args) {
// TODO 自动生成的方法存根
char ch='A';
for (int i = 1; i <= 7; i++) {
for ( int j = 1; j <= 7- i; j++)
System.out.print(" ");
for (int k = 1; k <= 2 * i - 1; k++)
System.out.print(ch);
ch++;
System.out.println();
}
}
}