Skip to content

Instantly share code, notes, and snippets.

@tavin
Created October 9, 2018 15:23
Show Gist options
  • Save tavin/9637d829cdc8517931cc5d9030e79e8b to your computer and use it in GitHub Desktop.
Save tavin/9637d829cdc8517931cc5d9030e79e8b to your computer and use it in GitHub Desktop.
#!/bin/bash
fibs=(1 1)
while ((fibs[-1] < 200))
do
echo ${fibs[@]}
fibn=$((fibs[-1] + fibs[-2]))
fibs+=($fibn)
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment