Q. How do I print fibonacci series in Bash
Ans:
#!/bin/bash c=0 a=1 b=1 read -p "Enter limit of fibonacci Series:" n echo -n "$a " echo -n "$b " #Fibonacci series logic while((c<n)) do c=$((a+b)) echo -n "$c " a=$b b=$c done echo -e "\n"
Output
Enjoy :)
If You Liked This Post Please Take a Time To Share This Post

Thanks for this excellent and informative post, it’s very helpful. Read this profile to explore more. CPS Games is a browser gaming site that helps users improve click speed skills.
ReplyDelete