Java Program For Pyramid Of Numbers

3 comments - Post a comment

Pyramid Sequence

4
4 3
4 3 2
4 3 2 1


class Pyramid3
{
public static void main(String args[])
{
int i,j;
for(i=4;i>=1;i--)
{
for(j=4;j>=i;j--)
System.out.print(" "+j);
System.out.print("\n");
}
}
}

/********* OUTPUT ********
4
4 3
4 3 2
4 3 2 1 */

 
This Post has 3 Comments Add your own!
Anonymous - March 27, 2011 at 8:48 PM

This is not a pyramid, u made a triangle of *

ani - August 13, 2012 at 9:16 PM

please give the code of

3
36
365
3652

ani - August 13, 2012 at 9:16 PM

please
3
36
365
3652

Post a Comment