Skip to content

Commit e2c22df

Browse files
authored
Merge pull request exercism#1606 from uzilan/two-fer
two-fer: updated readme
2 parents 39c8aef + 19b3740 commit e2c22df

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

‎exercises/two-fer/README.md‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,28 @@
22

33
`Two-fer` or `2-fer` is short for two for one. One for you and one for me.
44

5+
Given a name, return a string with the message:
6+
7+
```text
8+
One for X, one for me.
9+
```
10+
11+
Where X is the given name.
12+
13+
However, if the name is missing, return the string:
14+
515
```text
6-
"One for X, one for me."
16+
One for you, one for me.
717
```
818

9-
When X is a name or "you".
19+
Here are some examples:
1020

11-
If the given name is "Alice", the result should be "One for Alice, one for me."
12-
If no name is given, the result should be "One for you, one for me."
21+
|Name | String to return
22+
|:------:|:-----------------:
23+
|Alice | One for Alice, one for me.
24+
|Bob | One for Bob, one for me.
25+
| | One for you, one for me.
26+
|Zaphod | One for Zaphod, one for me.
1327

1428

1529
# Java Tips

0 commit comments

Comments
 (0)