Skip to content

Commit f6e2b8e

Browse files
authored
prints the outline of a house using tilde (~) characters
1 parent a54a0c7 commit f6e2b8e

File tree

1 file changed

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

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
public class PP2 {
2+
/**
3+
* Write a program that prints the outline of a house using tilde (~)
4+
* characters.
5+
* */
6+
7+
public static void main(String[] args){
8+
System.out.println(" ~\n" +
9+
" ~ ~\n" +
10+
" ~ ~\n" +
11+
" ~~~~~~~\n" +
12+
" ~ ~\n" +
13+
" ~ ~\n" +
14+
" ~ ~\n" +
15+
"~~~~~~~~~");
16+
}
17+
}

0 commit comments

Comments
 (0)