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 ccd5d9f

Browse files
author
Jay Morales
committed
Add P1.12
1 parent df4cd97 commit ccd5d9f

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package progsolutions.ch01.p12;
2+
3+
import static java.lang.System.out;
4+
5+
/**
6+
* P0112.java
7+
*
8+
* @author Jay Morales
9+
*/
10+
class P0112 {
11+
/**
12+
* main.
13+
*
14+
* @param args args
15+
*/
16+
public static void main(String[] args) {
17+
out.println("Hey diddle, diddle,");
18+
out.println("The cat and the fiddle.");
19+
out.println("The cow jumped over the moon.");
20+
out.println("The little dog laughed to see such sport");
21+
out.println("And the dish ran away with the spoon.");
22+
}
23+
}

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[Back](../README.md)
2+
3+
## P1.12
4+
5+
Write a program that prints a poem of your choice. If you don't have a favorite poem, search the Internet for "Emily Dickinson" or "e e cummings."
6+
7+
---
8+
9+
Solution:
10+
11+
```java
12+
import static java.lang.System.out;
13+
14+
class P0112
15+
{
16+
public static void main(String[] args)
17+
{
18+
out.println("Hey diddle, diddle,");
19+
out.println("The cat and the fiddle.");
20+
out.println("The cow jumped over the moon.");
21+
out.println("The little dog laughed to see such sport");
22+
out.println("And the dish ran away with the spoon.");
23+
}
24+
}
25+
```

0 commit comments

Comments
(0)

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