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