Thank you very much!
CodePudding user response:
Wrote a casually, can consult#!/bin/bash
A=0
B=1
Fibo=(0, 1)
Sum=1
Echo "fibo list 1:" $a
Echo "fibo list 2:" $b
For ((I=3; i<=20; i++));
Do
Let a + c=$$b;
A=$b;
B=$c;
Fibo=(${fibo (@)} $c);
Let d=$I - 1;
Echo "fibo list" $I ":" ${fibo [$d]}.
Let the sum=$sum + ${fibo [$d]}.
The done
Echo "fibo 20 sum is:" $sum