diff options
Diffstat (limited to '3808/CH2/EX2.8/Ex2_8.sce')
-rw-r--r-- | 3808/CH2/EX2.8/Ex2_8.sce | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/3808/CH2/EX2.8/Ex2_8.sce b/3808/CH2/EX2.8/Ex2_8.sce new file mode 100644 index 000000000..a824de0c6 --- /dev/null +++ b/3808/CH2/EX2.8/Ex2_8.sce @@ -0,0 +1,12 @@ +//Chapter 02:Basic Structures: Sets, Functions, Sequences, Sums and Matrices + +clc; +clear; + +f=[0,1,0,0,0,0,0] //given +//index starts from 1 so f0 is not present +mprintf("Fibonacci series is:\n") +for i=3:7 + f(i)=f(i-1)+f(i-2) + mprintf("f[%d]=f[%d] + f[%d]=%d\n",i,i-1,i-2,f(i)) +end |