Write a program in C++ to find the sum of the series using the constructor overloading

Write a program in C++ to find the sum of the series using the constructor overloading.

sum of the series in C++

Output

sum of the series in C++