Fibonacci Series in GO Language
package main import "fmt" func main() { limit := 10 // Change the limit here ( n value ) n := 0 x := -1 y := 1 for i := 0; i < limit; i++ { n = x + y x = y y = n fmt.Println(n) } }
0 1 1 2 3 5 8 13 21 34
Comments :