This program is incorrect
package main import "fmt" func f(a, b int) { var min = 0 fmt.Printf("The min of %d and %d is %d\n", a, b, min) } func main() { f(9000, 314) }
By adding only one line can you make it print the correct answer ?
The code must continue to be correctly formatted.
Bonus points will be awarded for the most creative solution.
Points will be deducted for arguing with the judge (me).
Update: thanks to Gustavo Niemeyer who pointed out the first version of the quiz made it way to easy.
Update: a few people have provided some very sound, rational solutions. Good job, give yourself a code review gold star.
The bonus points for the most creative solution are still on the table. As a hint my solution will also work for this variant of the problem.
The answer(s) will be posted tomorrow.