Monday 9 June 2014

Pattern 9

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

}}
output:

1
22
333
4444

No comments:

Post a Comment

SAY HELLO!!