elithunders
elithunders elithunders
  • 18-01-2020
  • Computers and Technology
contestada

write a c program to print the sum of cubes of odd numbers between 1 to 100​

Respuesta :

tonb
tonb tonb
  • 19-01-2020

Answer:

   int sum = 0;

   for (int i = 1; i < 100; i += 2) {

       sum += i * i;

   }

   printf("The sum of cubes is %d", sum);

   /* Prints: The sum of cubes is 166650 */

Explanation:

If 1 should be excluded, let the for loop start at 3.

Answer Link

Otras preguntas

Find the plane containing the points Z, S, and Y. Which statement is true?Point X is coplanar with points Z, S, and Y.Point V is coplanar with points Z, S, and
A strand of DNA has 22% adenine. List the percentages of guanine, thymine, and cytosine.​
Which statement most completely defines a wave? * A wave transfers energy and matter from one point to another through a medium. A wave transfers energy and mat
Find the word that has been divided into syllables correctly.CA. un-hurtB. unhu-rtC. unh-urtD. u-nhurt​
2x - y + z = 15 -6x - y - z= -11 4x - 3y - z= 0
_____ is the possibility of loss or injury.
A grocery store orders 47 bags of onins and 162 bags of potatoes. The onions cost 2 per bag , and potatoes cost 3 per bag How much is spent on onions and potato
Bau Long-Haul, Inc., is considering the purchase of a tractor-trailer that would cost $283,215, would have a useful life of 7 years, and would have no salvage v
the great depression was a difficult period for most americans. people looked for ways to _______ about their troubles.
i need help asap the term 25ab and which other term are like terms? i dont under stand.