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 ae765ec

Browse files
author
Jay Morales
committed
Add P1.7
1 parent ea84591 commit ae765ec

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package progsolutions.ch01.p07;
2+
3+
import static java.lang.System.out;
4+
5+
/**
6+
* P0107.java
7+
*
8+
* @author Jay Morales
9+
*/
10+
class P0107 {
11+
/**
12+
* main.
13+
*
14+
* @param args args
15+
*/
16+
public static void main(String[] args) {
17+
out.println(" ////// ");
18+
out.println(" ..~~~~~.. ");
19+
out.println(" ! ! ");
20+
out.println("[! @ @ !]");
21+
out.println(" ! ^ ! ");
22+
out.println(" ! === ! ");
23+
out.println(" ! ' ! ");
24+
out.println(" '#######' ");
25+
out.println(" ### ");
26+
}
27+
}

‎src/progsolutions/ch01/p07/README.md‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[Back](../README.md)
2+
3+
## P1.7
4+
5+
Write a program that prints a face similar to (but different from) the following:
6+
7+
```bash
8+
/////
9+
+"""""+
10+
(| o o |)
11+
| ^ |
12+
| '-' |
13+
+-----+
14+
```
15+
16+
---
17+
18+
Solution:
19+
20+
```java
21+
import static java.lang.System.out;
22+
23+
class P0107
24+
{
25+
public static void main(String[] args)
26+
{
27+
out.println(" ////// ");
28+
out.println(" ..~~~~~.. ");
29+
out.println(" ! ! ");
30+
out.println("[! @ @ !]");
31+
out.println(" ! ^ ! ");
32+
out.println(" ! === ! ");
33+
out.println(" ! ' ! ");
34+
out.println(" '#######' ");
35+
out.println(" ### ");
36+
}
37+
}
38+
```

0 commit comments

Comments
(0)

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