1. Miki Tebeka
  2. go-play

Commits

Miki Tebeka  committed 238d86b

format

  • Participants
  • Parent commits b1200a5
  • Branches default

Comments (0)

Files changed (1)

File fib.go

View file
  • Ignore whitespace
 func fib(n int) int {
 	a, b := 1, 1
 	for i := 0; i < n-1; i++ {
-		a, b = b, a + b
+		a, b = b, a+b
 	}
 
 	return b