public class Solution {
public static void main(String[] args) throws Exception {
//tutaj wpisz swój kod
for (int i = 1; i <=10; i++){
System.out.println("8888888888");
for (int j = 1; j <i; j ++){
System.out.println("8");
}
}
}
}
Witam. Zamieściłem powyższy kod i kompilator przepuścił mi zadanie, chociaż po wyniku widze, że nie jest do końca dobrze zrobione
Kompilator niedokońca działa dobrze
Dyskutowane
Komentarze (1)
- Popularne
- Najnowsze
- Najstarsze
Musisz się zalogować, aby dodać komentarz
zimme
7 czerwca 2020, 21:43
hi
first for loop System.out.print("8"), not println.
Println is printing each 8 on a new line, and system.out.print will print them in just one horizontal line.
Extract second for loop from the first one.
Second for loop should be(int j=1; j<=10; j++)
0