class Pyramid
{
public static void main(String args[])
{
int i,j,k;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
System.out.print(" ");
}
for(k=5;k>=i;k--)
{
System.out.print(" *");
}
for(k=4;k>=i;k--)
{
System.out.print(" *");
}
System.out.println(" ");
System.out.println(" ");
}
}
}
Any One give me this code in Java
ReplyDelete*
** **
*** ***
** **
*
How to Write this program to Print Star Pattern in Java
Really Nice Post to Print Star Pattern in Java Yesterday I visit this blog and i was found lots of helpful information from your side thanks for sharing updated and New Technology related Post.
ReplyDelete