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

TOP

返回列表