From 373d3045e49a0a3d204996d8152c390425662696 Mon Sep 17 00:00:00 2001 From: Michele Sessa Date: Tue, 27 Jun 2023 13:05:22 +0100 Subject: [PATCH] feat(fishandchips): improve readability by removing end of lines requirements --- subjects/fishandchips/README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/subjects/fishandchips/README.md b/subjects/fishandchips/README.md index a56a19641..c705ef810 100644 --- a/subjects/fishandchips/README.md +++ b/subjects/fishandchips/README.md @@ -4,11 +4,11 @@ Write a function called `FishAndChips()` that takes an `int` and returns a `string`. -- If the number is divisible by 2, print `fish` followed by a newline `\n`. -- If the number is divisible by 3, print `chips` followed by a newline `\n`. -- If the number is divisible by 2 and 3, print `fish and chips` followed by a newline `\n`. -- If the number is negative return `error: number is negative` followed by a newline `\n`. -- If the number is non divisible return `error: non divisible` followed by a newline `\n`. +- If the number is divisible by 2, print `fish`. +- If the number is divisible by 3, print `chips`. +- If the number is divisible by 2 and 3, print `fish and chips`. +- If the number is negative return `error: number is negative`. +- If the number is non divisible by 2 or 3 return `error: non divisible`. ### Expected function @@ -40,10 +40,8 @@ func main() { And its output: ```console +$ go run . | cat -e fish$ -$ chips$ -$ fish and chips$ -$ ```