Sum Of Series 1 + 2 + 4 + 8 + 16 + 32 + . . n

Sum Of Series 1 + 2 + 4 + 8 + 16 + 32 + . . n

Program code: #include <iostream> #include <math.h> using namespace std; //calculating the sum of the series double calc_sum(int n) { int…

2 years ago