Hey , for the past 1.5h I´m trying to find the answer. Now I´ve got it but i think there is an easier way. Can you help me find it ?
public class Solution {
public static void main(String[] args) {
for (int i = 1; i<=10; i++) {
if(i>=2){ // is there a better way for this line (do i need the if) ??!!
System.out.println();}
for (int j = 1; j<=10; j++) {
// I didn´t post the last line. So it´s not the whole solution
Thank you for helping me out. Have a nice day and stay Heathy :)
Help for improvement
Gelöst
Kommentare (2)
- Beliebt
- Neu
- Alt
Du musst angemeldet sein, um einen Kommentar schreiben zu können
RFCO
30 März 2020, 13:29
You can add the values with a space to a string and println(string) when second for loop finishes.
+1
Misiu
27 März 2020, 21:40Lösung
System.out.println(); just after the second FOR loop (but in the first loop).
+2