Docstoc

Pyramid Types 2 in Java

Document Sample
Pyramid Types 2 in Java Powered By Docstoc
					//Write a program to make Pyramid types Figures
class Fig2
{
public static void main(String args[])
{
int a=10;
for(int i=1;i<=a;i++)
{
  for(int j=(a-i);j>=1;j--)
   System.out.print(" ");
  for(int k=1;k<=i;k++)
   {
    System.out.print("*");
    System.out.print(" ");
   }

 System.out.print("\n");
}
}
}

Output:

				
DOCUMENT INFO
Shared By:
Stats:
views:22
posted:5/19/2012
language:
pages:1
Description: I am going to upload lots of Java Programs for Java Learner.