To print and sum of following series x + x^2 + x^3 + x^4..........x^n
#include <iostream> using namespace std; void main () { cout<< "Please enter the Base (X) here:" ; int base; cin>>base; cout<< "Please enter the power (n) here: " ; int power; cin>>power; cout<< "\n" ; // for line space only int i=1; //outer loop int ans=1; int sum=0; while (i<=power) { cout<<i<< "^" <<power<< " " ; ...