The following Go program fails to compile
package main
import (
"fmt"
)
func main() {
var celcius int
for i := 0; i <= 300; i + 20 {
celcius = 5 * (i - 32) / 9
fmt.Printf("%d \t %d\t
", i, celcius)
}
}
The Error message is "i + 20 evaluated but not used" . How to give a step increment in golang for loop