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 08c9737

Browse files
prints an hourglass shape
1 parent c69633b commit 08c9737

File tree

1 file changed

+9
-9
lines changed
  • textbook work/java software solutions/intro

1 file changed

+9
-9
lines changed
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
public class PP3.java {
1+
public class PP3 {
22
/**
3-
* Write a program that prints an hourglass shape.
3+
* Write a program that prints an hourglass shape.
44
* */
55

66
public static void main(String[] args){
7-
System.out.println("#########\n" +
8-
" ##### \n" +
9-
" ### \n" +
10-
" # \n" +
11-
" ### \n" +
12-
" ##### \n" +
13-
"#########");
7+
System.out.println("#########");
8+
System.out.println(" ##### ");
9+
System.out.println(" ### ");
10+
System.out.println(" # ");
11+
System.out.println(" ### ");
12+
System.out.println(" ##### ");
13+
System.out.println("#########");
1414
}
1515
}

0 commit comments

Comments
(0)

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