package com.aaa; import java.util.Scanner; //重在参与,欢迎评价,吐槽~~~~
//输出直角三角形 public class Se { public static void main(String[] args) { Scanner c = new Scanner(System.in); System.out.println("请输入三角形的行数--------"); int x = c.nextInt(); for (int i = 1; i <= x; i++) { for (int j = 1; j <= i; j++) { System.out.print("* "); } System.out.println(); } } }