mirror of https://github.com/01-edu/public.git
fix(loafofbread): add missing import piscine and add second # to the title
This commit is contained in:
parent
27ef0d2782
commit
57ab470299
|
@ -1,8 +1,8 @@
|
|||
# loafofbread
|
||||
## loafofbread
|
||||
|
||||
### Instructions
|
||||
|
||||
Write a function `LoafOfBread()` that takes a string and returns another one with words of 5 characters and skips the next character followed by newline `\n`.
|
||||
Write a function `LoafOfBread()` that takes a `string` and returns another one with words of 5 characters and skips the next character followed by newline `\n`.
|
||||
|
||||
- If there is a space in the middle of a word it should ignore it and get the next character until getting to a length of 5.
|
||||
- If the string is less than 5 characters return "Invalid Output\n".
|
||||
|
@ -22,12 +22,15 @@ Here is a possible program to test your function:
|
|||
```go
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
"piscine"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Print(LoafOfBread("deliciousbread"))
|
||||
fmt.Print(LoafOfBread("This is a loaf of bread"))
|
||||
fmt.Print(LoafOfBread("loaf"))
|
||||
fmt.Print(piscine.LoafOfBread("deliciousbread"))
|
||||
fmt.Print(piscine.LoafOfBread("This is a loaf of bread"))
|
||||
fmt.Print(piscine.LoafOfBread("loaf"))
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue