Translate

Monday 9 July 2012

Write java code to print following pattern

..........
.........
........
.......
......
.....
....
...
..
.
Solution:

class Pattern4
{
public static void main(String args[])
{
for(int i=0;i<10;i++)
{
for(int j=i;j<10;j++)
{
System.out.print(".");
}
System.out.println();
}
}
}



No comments:

Post a Comment