标签:pack i++ ack class stat generated method todo main
package 随堂;
public class 四棱坠 {
public static void main(String[] args) {
// TODO Auto-generated method stub
for (int i = 1; i <= 10; i++) {
for (int j = 10; j >=i;j--)
{
System.out.print(" ");
}
for (int j = 1; j <= i*2-1; j++)
{
System.out.print("*" );
}
System.out.println();
}
for (int a = 1; a <= 10; a++)
{
for(int b=1; b<=a; b++){
System.out.print(" ");
}
for(int b=19;b>=a*2-1;b--)
{
System.out.print("*");
}
System.out.println(); }
}
}
标签:pack i++ ack class stat generated method todo main
原文地址:https://www.cnblogs.com/fengchedao/p/14180625.html