You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
92 B
Go
9 lines
92 B
Go
3 years ago
|
package main
|
||
|
|
||
|
func Fib(n int) int {
|
||
|
if n < 2 {
|
||
|
return n
|
||
|
}
|
||
|
return Fib(n-1) + Fib(n-2)
|
||
|
}
|