Subject(remove-odd):add readmed

This commit is contained in:
hamza 2022-06-16 16:21:05 +01:00 committed by Hamza elkhatri
parent 6d2a7bb7f2
commit f9654289c6
1 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,36 @@
## remove-odd
### Instructions
Write a function named `RemoveOdd(string)` that takes a string and returns a new string with all the odd characters removed.
- The function should skip spaces.
### Expected function
```go
func RemoveOdd(string) string{
// your code here
}
```
### Usage
``` go
package main
import "fmt"
func main(){
fmt.Println(RemoveOdd("Hello World"))
fmt.Println(RemoveOdd("H"))
fmt.Println(RemoveOdd("How are you?"))
}
```
and the output should be:
```console
$ go run .
Hlo Wrd
H
Hw ae yu
```