2015-11-27 18:54:43 +01:00
|
|
|
package main
|
|
|
|
|
|
|
|
func fib(n uint) uint {
|
|
|
|
if n < 2 {
|
|
|
|
return n
|
|
|
|
} else {
|
|
|
|
return fib(n-1) + fib(n-2)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
sum := 1
|
2019-07-23 19:14:28 +02:00
|
|
|
for sum < 100000 {
|
2015-11-27 18:54:43 +01:00
|
|
|
sum += 1
|
2019-07-23 19:14:28 +02:00
|
|
|
fib( 10 )
|
2015-11-27 18:54:43 +01:00
|
|
|
}
|
|
|
|
}
|