Skip to content

Commit f583ef7

Browse files
Star Pattern
1 parent ddcc2e9 commit f583ef7

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
Write a program that displays the following pattern:
3+
*
4+
***
5+
*****
6+
*******
7+
*****
8+
***
9+
*
10+
*/
11+
12+
package com.challenges;
13+
14+
public class StarPattern {
15+
public static void main(String [] args) {
16+
17+
System.out.println(" * ");
18+
System.out.println(" *** ");
19+
System.out.println(" ***** ");
20+
System.out.println("*******");
21+
System.out.println(" ***** ");
22+
System.out.println(" *** ");
23+
System.out.println(" * ");
24+
}
25+
}

0 commit comments

Comments
 (0)