public static void main(String[] args)
{
/*
打印:
*
* *
* * *
* *
* * *
* * * *
* * *
* * * *
* * * * *
∏
∏
∏
*/
int c = 5;
for(int i = 0;i < c;i++)
{
if(i == 3)
{
break;
}
for(int j = c;j > i+1;j--)
{
System.out.print(" ");
}
for(int j = 0;j < i+1;j++)
{
System.out.print("* ");
}
System.out.println();
}
int a = c;
for(int i = 0;i < a;i++)
{
if(i == 0)
{
continue;
}
if(i == 4)
{
break;
}
for(int j = a;j > i+1;j--)
{
System.out.print(" ");
}
for(int j = 0;j < i+1;j++)
{
System.out.print("* ");
}
System.out.println();
}
int y = c;
for(int i = 0;i < y;i++)
{
if(i==0 || i== 1)
{
continue;
}
for(int j = y;j > i+1;j--)
{
System.out.print(" ");
}
for(int j = 0;j < i+1;j++)
{
System.out.print("* ");
}
System.out.println();
}
for(int x = 0;x < 3;x++)
{
for(int j = 0;j < y-1;j++)
{
System.out.print(" ");
}
System.out.println("∏");
}
}
{
/*
打印:
*
* *
* * *
* *
* * *
* * * *
* * *
* * * *
* * * * *
∏
∏
∏
*/
int c = 5;
for(int i = 0;i < c;i++)
{
if(i == 3)
{
break;
}
for(int j = c;j > i+1;j--)
{
System.out.print(" ");
}
for(int j = 0;j < i+1;j++)
{
System.out.print("* ");
}
System.out.println();
}
int a = c;
for(int i = 0;i < a;i++)
{
if(i == 0)
{
continue;
}
if(i == 4)
{
break;
}
for(int j = a;j > i+1;j--)
{
System.out.print(" ");
}
for(int j = 0;j < i+1;j++)
{
System.out.print("* ");
}
System.out.println();
}
int y = c;
for(int i = 0;i < y;i++)
{
if(i==0 || i== 1)
{
continue;
}
for(int j = y;j > i+1;j--)
{
System.out.print(" ");
}
for(int j = 0;j < i+1;j++)
{
System.out.print("* ");
}
System.out.println();
}
for(int x = 0;x < 3;x++)
{
for(int j = 0;j < y-1;j++)
{
System.out.print(" ");
}
System.out.println("∏");
}
}