diff --git a/subjects/printandmiss/README.md b/subjects/printandmiss/README.md index 97d1821f..1f8ce802 100644 --- a/subjects/printandmiss/README.md +++ b/subjects/printandmiss/README.md @@ -5,7 +5,8 @@ Write a function called `PrintAndMiss()` that takes a string and an integer and prints a string containing the characters until reaching the integer, then skipping that same number of characters, and repeats until the end of the string. - Prints the first half followed by newline `\n`. -- if the string is empty retun `Invalid Output`. +- If the string is empty retun `Invalid Output`. +- If the integer is `0` return the string followed by a newline `\n`. ### Expected function @@ -30,6 +31,7 @@ func main() { fmt.PrintAndMiss("abcdefghijklmnopqrstuvwyz", 3) fmt.PrintAndMiss("", 3) fmt.PrintAndMiss("hello you all ! ", 2) + fmt.PrintAndMiss("what is your name?", 0) } ``` @@ -41,4 +43,5 @@ $ go run . | cat -e abcghimnostuz$ Invalid Output$ heo u ll $ +what is your name?$ ``` \ No newline at end of file