Answer to Question #162822 in Algorithms for Augustine Asakiyaba

Question #162822

Flow chart for the sum of the series f(x)=1+x +x^2+x^3+...+x^n


1
Expert's answer
2021-02-11T04:21:23-0500
start
define first term as x, total number of terms as n
sum(int x, int n)
{
    double i, total = 1.0, multi = x;
    cout << total << " ";
    for (i = 1; i < n; i++) {
          total = total + multi;
          cout << multi << " ";
          multi = multi * x;
}
end

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 the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS