Wednesday, 27 July 2011

Program for Printing the following pyramid



1
2 2
3 3 3
4 4 4 4
n n n ………………n

class series
{

Public static void main (String args[])
{

int i,j,n;
n=50;

for(i=1;i<=50; i++ )

{

for(j=1;j<=1;j++)

{

system.out.print (i);

}

system.out.println (“ “);

}
}
}

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More