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

which set of angle measures could form a triangle
After Darwin proposed his ideas about natural selection as a mechanism for evolution, it took time before evolution was generally considered a theory. Why do we
what were the 3 promises Christopher Columbus made to Ferdinand and Isabella?
Which statement best explains why Mordred would want to take over Arthur’s throne in Morte d’Arthur by Sir Thomas Malory?
Speed is a component of skill-related fitness. what does speed enable you to do? to keep a steady posture while moving to complete a task in a short amount of t
Which sentence best expresses Jack London’s point of view in his essay “The Human Drift”? Nations wage wars to outdo each other in the race to become the most p
Can you please tell me what the answer is to this question is? I really need help on this and I don't understand what to do! :(
Use the net surface area of the cylinder 4yd , 9yd
Very confused! Help would be very much appreciated!
i really need help so much