class test
{
public static void main(String []vinnitro)
{
int n=5;
for(int i=1;i<=n;i++)
{
if(i<=n/2+1)
{
for(int j=1;j<=i;j++)
{
System.out.print("*");
}
}
else
{
for(int k=n/2+2;k>=i-1;k--)
{
System.out.print("*");
}
}
System.out.println();
}
}
}
It works as i expected but it is still very difficult to understand for me even if I coded it.
Thnx 4 help in advance