+ 2
Suppose following is a letter-based pattern,I am finding difficulty to print the letters with space between?
char i,j; for (i='D';i>='A';i--) { for (j=i;j<='D';j++) { System .out.print(j ); } System .out .println (); } these are the codes of my pattern , kindly make necessary changes in these codes so I can know how it should be done.
1 Resposta
+ 5
If you want to add space beetwen them just put System.out.print(j + " ");