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 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)

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