Posted by : Unknown Thursday, 11 June 2015

class OddPyramid
{
public static void main(String args[])
{
int i=5;
while(i>=1)
{
for(int j=1;j<=i;j++)
System.out.print("*");
i=i-2;
System.out.println ();
}
}
}

Output:

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Welcome to My Blog

Translate

Popular Post

Total Pageviews

Blog Archive

- Copyright © Learning Java Program - Powered by Blogger -