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

On a sunny day mark can stay in the sun for 20 minutes before he gets sunburnt. He wants to sunbathe for 3 hours. What is the lowest level of sun protection tha
abbie spent 5/8 of her money and saved the rest. if she spent 45,how much money did she have at first?
What is the difference between refraction and rarefaction?
how did kensuke end up on the island before Michel ?
what the break in the lithosphere called
You want to invest $10,000 dollars. How long will it take to double your investment at an annual interest rate of 10%, compounded continuously? (Round your answ
A group consisted of 2 girls for every boy. 24 more girls joined in the class. There are now 5 girls for every boy. How many are in the class?
what is 13,100+2600 in scientific notation?
what is x squared minus 14x plus 49
Joseph's taxi charges $10.00 for the initial service of any drive. Then, the fee for each mile is $0.75. Which type of function is represented by this situation