Oops. Math error 101. It's not the last number i that is printed...

On Tuesday, February 7, 2017 at 5:36:47 PM UTC+2, Tomi Häsä wrote:
>
> Is it normal to get 45 in the Flow Control example?
>
> https://tour.golang.org/flowcontrol/1
>
> package main
>
> import "fmt"
>
> func main() {
> sum := 0
> for i := 0; i < 10; i++ {
> sum += i
> fmt.Println(i)
> }
> fmt.Println(sum)
> }
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to