Responsive Advertisement

Write a program to compute the sum of the first n terms of the following series: S = 1 - 1 / (2 ^ 2) + 1 / (3 ^ 3) - ... 1 / (n ^ n) where ^ is exponentiation. The number of terms n is to be taken from user through command line. If command line argument is not found then prompt the user to enter the value of n.

Write a program to compute the sum of the first n terms of the following series: S = 1 - 1 / (2 ^ 2) + 1 / (3 ^ 3) - ... 1 / (n ^ n) where ^ is exponent…

Read more