Program code: #include <iostream> #include <math.h> using namespace std; //calculating the sum of the series double calc_sum(int n) { int…
A program to compute the sum of a given series 1 + 1/2^2 + 1/3^3 + …..+ 1/n^n. For this,…