Добавить
Уведомления

Java Practice It || 2.30 nestedLoops || nested for loop

Question: What output is produced by the following program? public class Loops { public static void main(String[] args) { for (int i = 1; i = 10; i++) { for (int j = 1; j = 10 - i; j++) { System.out.print(" "); } for (int j = 1; j= 2 * i - 1; j++) { System.out.print("*"); } System.out.println(); } } } Problem: https://practiceit.cs.washington.edu/problem/view/bjp5/chapter2/s30-nestedLoops

12+
16 просмотров
2 года назад
12+
16 просмотров
2 года назад

Question: What output is produced by the following program? public class Loops { public static void main(String[] args) { for (int i = 1; i = 10; i++) { for (int j = 1; j = 10 - i; j++) { System.out.print(" "); } for (int j = 1; j= 2 * i - 1; j++) { System.out.print("*"); } System.out.println(); } } } Problem: https://practiceit.cs.washington.edu/problem/view/bjp5/chapter2/s30-nestedLoops

, чтобы оставлять комментарии