Login light
package main
import (
    "flag"
    "fmt"
    // "strings"
)
var n = flag.Int("n", 101, "需要输入一个数字!")
func main() {
    flag.Parse()
    // arga := flag.Args()
    fmt.Printf("斐波那契的第n个数字,n = %d\n", *n)
    fmt.Print(fiv(*n))
}

func fiv(n int) int {
    x, y := 0, 1
    for i := 0; i < n; i++ {
        x, y = y, x+y
    }
    return x
}