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

// 5,8,11,14,17.....
clear;
clc;
close;
a=5;//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)