0

How to print Abcdefghi inside a five by five * square pattern in java

11th Sep 2020, 12:46 PM
Arravindh
Arravindh - avatar
3 ответов
+ 1
Can you show your attempt? How much have you tried?
11th Sep 2020, 12:58 PM
Nilesh
Nilesh - avatar
0
it prints only the borders
11th Sep 2020, 1:17 PM
Arravindh
Arravindh - avatar
- 1
int i , j; for(i = 1;i<=5; i++){ for(j=1;j<=5;j++){ if(i==1|| j==1||j==5||i==5){ S.o.print("* "); }else S.o.print(" "); } S.o.println(); } } } }
11th Sep 2020, 1:13 PM
Arravindh
Arravindh - avatar