Salmataha
Salmataha
JCHJava Community | Help. Code. Learn.
Created by Salmataha on 12/7/2024 in #java-help
i have a problem understanding nested for loops
for (int i = 1; i <= 5; i++) {
for (int j = 1; j <= i; j++) {
System.out.print("*");
}
System.out.println();
}
for (int i = 1; i <= 5; i++) {
for (int j = 1; j <= i; j++) {
System.out.print("*");
}
System.out.println();
}
i don't get why the number of asterisks ascends in this loop
9 replies