Skip to content

Commit 1722631

Browse files
committed
first commit
1 parent b3d0693 commit 1722631

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Pattern_SolidRhombus.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// * * * * *
2+
// * * * * *
3+
// * * * * *
4+
// * * * * *
5+
// * * * * *
6+
7+
import java.util.Scanner;
8+
9+
public class Pattern_SolidRhombus {
10+
public static void main(String[] args) {
11+
12+
Scanner sc = new Scanner(System.in);
13+
14+
int row = sc.nextInt();
15+
16+
for (int i = 0; i < row; i++) {
17+
for (int j = 0; j < row - i; j++) {
18+
System.out.print(" ");
19+
}
20+
for (int j = 0; j < row; j++) {
21+
System.out.print("*");
22+
}
23+
System.out.println();
24+
}
25+
sc.close();
26+
}
27+
}

0 commit comments

Comments
 (0)