Quantcast
Channel: Webminal - Latest topics
Viewing all articles
Browse latest Browse all 484

Fibonacci.sh

$
0
0

@SYCS-327 wrote:

# Program for Fibonacci

# Series

# Static input fo N

N=6

# First Number of the

# Fibonacci Series

a=0

# Second Number of the

# Fibonacci Series

b=1

echo "The Fibonacci series is : "

for (( i=0; i<N; i++ ))

do

echo -n "$a "

fn=$((a + b))

a=$b

b=$fn

done

# End of for loop

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 484

Trending Articles