Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 28245b7

Browse files
New Pattern Programs Added
1 parent 3e3d5eb commit 28245b7

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

‎LeftAngledTrianglePattern.java‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
public class LeftAngledTrianglePattern{
2+
public static void main(String args[]){
3+
int i, j, r=8;
4+
for(i=0; i<r; i++){
5+
for(j=2*(r-i); j>=0; j--){
6+
System.out.print(" ");
7+
}
8+
for (j=0; j<=i; j++ ){
9+
System.out.print("* ");
10+
}
11+
System.out.println();
12+
}
13+
}
14+
}

‎RightAngledTrianglePattern.java‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
public class RightAngledTrianglePattern{
2+
public static void main(String args[]){
3+
int i, j;
4+
for(i=0; i<8; i++){
5+
for(j=0; j<=i; j++){
6+
System.out.print("* ");
7+
}
8+
System.out.println();
9+
}
10+
}
11+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /