- 1
Please give me this code for java...
1*********12********123*******1234******12345*****123456****1234567***12345678**123456789*
2 Answers
+ 1
int i, j;
for (i=1; i <10; i++)
{
for (j=1; j <= i; j++)
System.out.print(j);
for (j=10; j > i; j--)
System.out.print("*");
System.out.println();
}
0
There are many ways to do. This is the simplest one.
System.out.println("1*********");
...
System.out.println("123456789*");