blob: 298b5f8d1f9f258d74ae6476fc8f3822dd8d88f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
//sum of 7 terms of the series 4,-8,16,....
clear;
clc;
close;
r=-8/4;a=4;n=7;//given
//using the formula
S=string('a*(r^(n)-1)/(r-1)');
//substituting the values
Sum=evstr(S)
|