Few days back I got one comment to design a pattern using program that will will looks like:
7654321
66
55
44
33
22
11
I forgot to publish the comment. Anyway here is the codings of the program.
class BlueJ
{
int i,j,x;
public void show()
{
x=7;
for(i=0;i<7;i++)
{
for( j=0;j<7;j++)
{
System.out.print(x+" ");
if (i==0)
x--;
else if(i!=0 && j==1)
break;
}
System.out.println();
x=7-i-1;
}
}
}
Related Post: BlueJ Programs On Pattern
7654321
66
55
44
33
22
11
I forgot to publish the comment. Anyway here is the codings of the program.
class BlueJ
{
int i,j,x;
public void show()
{
x=7;
for(i=0;i<7;i++)
{
for( j=0;j<7;j++)
{
System.out.print(x+" ");
if (i==0)
x--;
else if(i!=0 && j==1)
break;
}
System.out.println();
x=7-i-1;
}
}
}
Related Post: BlueJ Programs On Pattern
No comments:
Post a Comment