Solution: how long is this string?
package main
import "fmt"
func main() {
var str string
fmt.Print("The string: ")
fmt.Scan(&str)
fmt.Printf("%v \n", len(str))
}
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
package main
import "fmt"
func main() {
var str string
fmt.Print("The string: ")
fmt.Scan(&str)
fmt.Printf("%v \n", len(str))
}