60 463
Assignments Done
98,1%
Successfully Done
In April 2018

Answer to Question #27866 in C++ for anahid

Question #27866
Write a c++ program for the sequence, ∑_(i=1)^n=2^(3^i )/i=2^(3^1 )/1+2^(3^2 )/2+2^(3^3 )/3+⋯+2^(3^n )/n if the manual input is n.
Expert's answer
#include <iostream>

using namespace std;

//main function
int main()
{
int n=0;
cout<<"Enter n: ";
cin>>n;//enter n
int sum=0;
for(int i=1;i<n;i++){
sum+=pow(2,(pow(3.0,i)/i));
}
//show result
cout<<"Sum = "<<sum;
cin>>n;//delay
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions