Skip to content

Instantly share code, notes, and snippets.

@OlgaEle
Created April 22, 2022 14:06
Show Gist options
  • Select an option

  • Save OlgaEle/8b3f2a9afd6259cb256c6a2a30e90c86 to your computer and use it in GitHub Desktop.

Select an option

Save OlgaEle/8b3f2a9afd6259cb256c6a2a30e90c86 to your computer and use it in GitHub Desktop.
macro fibo(n::Int64)
f = [0,1]
if n < 0
print("The input must be equal to or bigger than zero.")
else
for i in 3:n+1
push!(f, f[i-1] + f[i-2])
end
end
print(f[n+1])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment