(2)A = 3 , D = 2, N = 12 S (N) = S (12) = 168
[ ] ( 5 Seconds )
2 [ ] 3 [ ]
2 [ ] 12
[ ]
Example 57
Create a program to generate a common ratio sequence ( A : First item, R : common ratio, N : number )
Sum : S ( N ) = A + AR + AR 2 + AR3....
1)R 1
2)R = 1 A ( N ) = AR ( N – 1 ) Nth item : A ( N ) = A ( N – 1 )