-
Define a function that gets two integers, adds them and returns the result
- Make sure to also write code that executes the function
-
What is the problem with the following code? How to fix it?
package main
import "fmt"
func add(x, y int) {
return x + y
}
func main() {
fmt.Println("Result:", add(2, 3))
}
Click here to view the solution.