Declare and initialize a slice of strings with the length of y, and then print the length of the slice.
Slices
Making a slice of the given size
Report a typo
Sample Input 1:
2Sample Output 1:
2Write a program in Go
package main
import "fmt"
func main() {
// DO NOT delete or modify the code block below!
var y int
fmt.Scanln(&y)
// Make a slice of strings with the length 'y' below:
s := ?
fmt.Println(?) // print the 'len' of the slice here!
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.