public/subjects/removeodd
hamza f9654289c6 Subject(remove-odd):add readmed 2022-08-02 20:19:51 +01:00
..
README.md Subject(remove-odd):add readmed 2022-08-02 20:19:51 +01:00

README.md

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

func RemoveOdd(string) string{
    // your code here
}

Usage

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:

$ go run . 
Hlo Wrd
H
Hw ae yu