Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ "$1" == "--help" ] || [ "$1" -lt 1 ] || [ "$1" == "-h" ]; then
- echo calculate fibunachi number for argument that bigger then 0 and less then 94
- exit
- fi
- tmp=1
- result=0
- for (( i=1; $i<$1; i++))
- do
- let "result = result + tmp"
- let "tmp = result - tmp"
- done
- echo "$result"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement