/**
* 实现倒三角图形
*/
Scanner input = new Scanner(System.in);
System.out.print("请输入行数:");
int row = input.nextInt();
if (row > 2 && row < 22) {
for (int i = 0; i < row; i++) {
for (int j = 0; j < i; j++) {
System.out.print(" ");
}
for (int j = 0; j < 2 * (row - i) - 1; j++) {
System.out.print("*");
}
System.out.println();
}
} else {
System.out.println("非法行数");
}