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

// 5,12,19,26,33.....
clear;
clc;
close;
a=5;//a is starting number of the series
n=5;//given n=5
d=7;//difference between the numbers
td=a+(n-1)*d; //formula to be used for arithmetic series
mprintf("result= %i",td)