public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("请输入要打印的行数"); int count=input.nextInt(); for (int i = 1; i <= count; i++) { for (int j = 1; j <= i; j++) { System.out.print(j+" "); } System.out.println(); } } }
第九章 作业.
最新推荐文章于 2022-11-25 18:44:38 发布