package com.bdqn.yingyun; import java.util.Scanner; public class PingXingSiBianXing { public static void main(String[] args) { System.out.println("请输入平行四边的行数:"); @SuppressWarnings("resource") Scanner in = new Scanner(System.in); int n = in.nextInt(); for (int i = 1; i <= n; i++) { for (int j = 1; j <= i; j++) { System.out.print(" "); } for (int k = 1; k <=n; k++) { System.out.print("*"); } System.out.println(); } } }