Monday 9 June 2014

pattern 1


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

for(j=i; j>=1; j--)
{
System.out.print(j);
}
}

}
}
output:

1
21
321

No comments:

Post a Comment

SAY HELLO!!