import java.util.Scanner;

public class XMT_Ex3 {
    public static void main(String[] args){
        int row=0;
        Scanner input = new Scanner(System.in);
        System.out.println("请输入你想要打印的行数:");
        row=input.nextInt();
        for(int i=1;i<=row;i++){
            for(int j=1;j<=i;j++){
                System.out.print("#");
            }
            System.out.println();
        }
    }
}

posted on 2022-09-17 17:13  wshidaboss  阅读(312)  评论(0编辑  收藏  举报