Skip to content

Commit 0b0895a

Browse files
committed
feat: Add right-aligned upper triangle star pattern using nested loops
🧠 Logic: - Outer loop controls rows (1 to 4). - Inner loop runs from 1 to 4. - Print "* " when row index ≤ column index, else print spaces. - Creates a right-aligned upper triangular pattern. Signed-off-by: Somesh diwan <[email protected]>
1 parent d20f278 commit 0b0895a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Section8LoopAB/src/StarPatternsAB2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ public static void main(String[] args) {
1010
System.out.println("");
1111
}
1212
}
13-
}
13+
}

0 commit comments

Comments
 (0)