Created
July 25, 2017 17:57
-
-
Save Cyclenerd/13650883458c932e3b844993c98b7a8f to your computer and use it in GitHub Desktop.
Fibonacci number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
a="0" | |
b="1" | |
c="" | |
while [[ $b -lt 3000 ]]; do | |
c=$((a+b)) | |
echo "$a + $b = $c" | |
a="$b" | |
b="$c" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment