Answer:
The algorithm is as follows:
Input x
sum_a = 0
sum_b = 0
sum_c = 0
for i = 0 to 20
sum_a = sum_a + x^i
sum_b = sum_b + (-x)^i
sum_c = sum_c + x^i/(i+1)
print sum_a, sum_b, sum_c
Step-by-step explanation:
Required
An algorithm to solve (a), (b) and (c)
For Series (a):
This series is a geometric progression and the common ratio is x
i.e.

So, the sum of the series is:
Sum = Previous Sums + x^i --- where i is between 0 and 20 (inclusive)
For Series (b):
This series is a geometric progression and the common ratio is -x
i.e.

So, the sum of the series is:
Sum = Previous Sums + (-x^i) --- where i is between 0 and 20 (inclusive)
For Series (c):
This series is a neither arithmetic nor geometric progression.
It obeys the following rule:
--- where i is between 0 and 20 (inclusive)
So, the sum of the series is:
Sum = Previous Sums +