You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Augusto 5aa202fc57 Rephrase fibonacci exercise instructions 3 years ago
..
README.md Rephrase fibonacci exercise instructions 3 years ago

README.md

fibonacci

Instructions

Write a recursive function that returns the value at the position index in the fibonacci sequence.

The first value is at index 0.

The sequence starts this way: 0, 1, 1, 2, 3 etc...

A negative index will return -1.

for is forbidden for this exercise.

Expected function

package piscine

func Fibonacci(index int) int {

}

Usage

Here is a possible program to test your function :

package main

import (
	"fmt"
	"piscine"
)

func main() {
	arg1 := 4
	fmt.Println(piscine.Fibonacci(arg1))
}

And its output :

$ go run .
3
$