Flow chart for the sum of the series f(x)=1+x +x^2+x^3+...+x^n
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
Comments
Leave a comment