blob: fbb9fbd7148903302ff3f5da77397d0670fb0fca (
plain)
1
2
3
4
5
6
7
8
9
10
|
//8th term of the series 2,-6,18,-54,......
clear;
clc;
close;
//in the series r=-3, so using the formula
// nth term=a*r^(n-1)
a=2;n=8;//given data
term8=2*(-3)^(8-1);
mprintf("\n the eighth term of the series is %i",term8)
|