summaryrefslogtreecommitdiff
path: root/1322/CH5/EX5.2.b/47ex1_b.sce
blob: a945695c90650bba1620337f6ffcc39f16e27a7a (plain)
1
2
3
4
5
6
7
8
9
10

// 9,12,15,18,21.....
clear;
clc;
close;
a=9;//a is starting number of the series
n=5;//given n=5
d=3;//difference between the numbers
td=a+(n-1)*d;//formula to be used for arithmetic series
mprintf("ans= %i",td)