Computer Science, asked by archanadeaf, 5 months ago

write a program to find out the sum of the series. 1+x+X2+X2..............x2​

Answers

Answered by anu122512
0

Answer:

Program to find the sum of the series 1 + x + x^2+ x^3+ .. + x^n

Given an integer X, the task is to print the series and find the sum of the series 

Examples :

Input: X = 2, N = 5

Output: Sum = 31

1 2 4 8 16

Input: X = 1, N = 10

Output: Sum = 10

1 1 1 1 1 1 1 1 1 1

plzz mark me brainiest

Similar questions