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-31 20:18:03 +02:00
|
|
|
for sum < 100 {
|
2015-11-27 18:54:43 +01:00
|
|
|
sum += 1
|
2019-07-30 20:16:24 +02:00
|
|
|
fib( 20 )
|
2015-11-27 18:54:43 +01:00
|
|
|
}
|
|
|
|
}
|