We've written a program and expected it to print 20, but the function does not return the value it computes, so the Go compiler rejects it.
In Go, this function header promises to return an int:
func getDouble(n int) int
That means the function body must use return to send an integer back to the caller.
Assignment:
Fix the function so it returns double n and the program prints 20.
Free plan: 30 tutor messages. PRO is unlimited.
Saved
Ctrl + Enter to check
