for (int x=1;x<=5;x++)
{
for (int y=x;y<=4;y++)
{
System.out.print(" ");
}
for (int a=1;a<=2*x-1;a++)
{
System.out.print("*");
}
System.out.println();
}
for (int m=4;m>0;m--)
{
for (int n=4;n>=m;n--)
{
System.out.print(" ");
}
for (int b=1;b<=2*m-1;b++)
{
System.out.print("*");
}
System.out.println();
}
|