Computer Science, asked by aryanburnwal8, 4 months ago

write a java program to print the following series.
S= 1+X+X^2+X^3+X^4...20 terms


pea4518977: Please marks as brainliest

Answers

Answered by pea4518977
0

Answer:

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

Explanation:


aryanburnwal8: it would be very helpful if you would write in a program
Similar questions