answersLogoWhite

0

The idea is to use a loop. To reduce the additional effort (and innacuracy) of power calculations, you can do repeated multiplication, as part of the loop. For example, in Java:

double sum = 1;
double xpower = 1.0;
for (int i = 1; i <= 100; i++)
{
xpower *= x;
sum += xPower;

}

The idea is to use a loop. To reduce the additional effort (and innacuracy) of power calculations, you can do repeated multiplication, as part of the loop. For example, in Java:

double sum = 1;
double xpower = 1.0;
for (int i = 1; i <= 100; i++)
{
xpower *= x;
sum += xPower;

}

The idea is to use a loop. To reduce the additional effort (and innacuracy) of power calculations, you can do repeated multiplication, as part of the loop. For example, in Java:

double sum = 1;
double xpower = 1.0;
for (int i = 1; i <= 100; i++)
{
xpower *= x;
sum += xPower;

}

The idea is to use a loop. To reduce the additional effort (and innacuracy) of power calculations, you can do repeated multiplication, as part of the loop. For example, in Java:

double sum = 1;
double xpower = 1.0;
for (int i = 1; i <= 100; i++)
{
xpower *= x;
sum += xPower;

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Write a c plus plus program to find the sum of series S equals 1 plus x2 plus x3 plus x3. plus xn?

(xn+2-1)/(x2-1)


4 plus 10 plus 16 plus plus 70 find the sum of this series?

4 plus 10 plus 16 plus 70 equals 100. To find the sum of this series, simply add all the numbers together.


How do you find the C programming of the sum of the series 5 plus 55 plus 555 plus . plus n terms?

Find the Sum to n terms of the series 5 5+55+555+ +n Terms


Write a program in BASIC to find the sum of the series s equals 2 plus 4 plus . plus 100?

10 print "That is not a question." 20 print "That is a command." 30 end


Write a program to find the sum of sine series?

Writing a program for a sum of sine series requires a rather long formula. That formula is: #include #include #include main() { int i,n,x; .


What is the assembly program to generate a geometric series and compute its sum The inputs are the base root and the length of the series The outputs are the series elements and their sum?

What is the assembly program to generate a geometric series and compute its sum The inputs are the base root and the length of the series The outputs are the series elements and their sum?


Find the sum of 1 plus 2 plus 3 plus . plus n nos using c program?

if (n%2==0) sum=n/2*(n+1); else sum=(n+1)/2*n;


Math problem help Find the sum of the infinite geometric series if it exists 1296 plus 432 plus 144 plus?

1,944 = 1296 x 1.5


Write a program in c plus plus for finding the sum of first 10 even numbers?

int i, sum = 0; for (i=0; i&lt;20; i+=2) sum+=i;


How do you find the sum of nos in a series?

It depends on the series.


What is the sum of the infinite series-112 plus 28 plus 7 plus 1.75 plus?

-75.25


What is the sum of this arithmetic series 2 plus 5 plus 8 plus ---- plus 53?

495