0
How to print Abcdefghi inside a five by five * square pattern in java
3 ответов
+ 1
Can you show your attempt?
How much have you tried?
0
it prints only the borders
- 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();
}
}
}
}