Try to predict what is the output of the following nested loop?
for (int i = 1; i <= 10; i++) {
for (int j = 1; i <= 5; j++) {
System.out.print(j);
}
System.out.println();
}
2. Try to predict what is the output of the following nested loop?
for (int i = 1; i <= 10; i++) {
for (int j = 1; j <= 5; i++) {
System.out.print(j);
}
System.out.println();
}
3. Create a nested for loop to output the following:
....1
...22
..333
.4444
55555