package com.java.week01;
import java.util.Scanner;
/**
*
* @author Alfred
* @data 2018年7月22日上午11:35:03 Description:控制台打印输倒等腰三角形。 Version:1.0
*/
public class Demo13 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
System.out.print("请输入要打印倒三角的行数:");
int row = sc.nextInt();
for (int i = 1; i <= row; i++) {
for (int j = 1; j < i; j++) {
System.out.print(" ");
}
for (int j = 0; j < 2 * (row - i + 1) - 1; j++) {
System.out.print("*");
}
System.out.println();
}
}
}