返回列表 發帖
  1. public class S{
  2.     public static void main(String args[])
  3.     {
  4.          for(int i=1;i<=4;i+=1 )
  5.          {
  6.              for(int a=1;a<=i-1;a+=1)
  7.              {
  8.                  System.out.print(" ");
  9.              }
  10.              for(int b=1;b<=8-i;b+=1)
  11.              {
  12.                  System.out.print("*");
  13.              }
  14.              System.out.println();
  15.          }
  16.     }
  17. }
複製代碼

TOP

返回列表