----------------------------
/*program to print star pattern square box by do while loop
55555
44444
33333
22222
11111
*/
class npat6do
{
public static void main(String a[])
{
int n,i,j;
n=Integer.parseInt(a[0]);
i=n;
do
{j=1;
do
{
System.out.print(i);
j++;
}
while(j<=n);
System.out.print("\n");
i--;
}
while(i>=1);
}
}
0 comments:
Post a Comment