Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  Program.java
Language: JAVA
Code:
class Program
{
 public static void main(String args[])
     {
       for (int i=1;i<=5;i++)
       {
           for(int k=4;k>=i;k--)
           {
               System.out.print(" ");
           }
           for(int j=1;j<=2*i-1;j++)
           {
             System.out.print("*");  
           }
           System.out.println();
       }
       for(int l=1;l<=3;l++)
       {
           for(int m=2;m<=4;m++)
           {
               System.out.print(" ");
           }
           for(int n=1;n<=7-2*l;n++)
           {
               System.out.print("*");
           }
           System.out.println();
       }
     }
}
Comments: