lilmissarieli7614 lilmissarieli7614
  • 19-06-2018
  • Computers and Technology
contestada

In the box provided below, write a for loop that adds the numbers in this sequence: 10,12,14,16,18, and stores the total in an integer variable called sum. int sum = 0;

Respuesta :

tonb
tonb tonb
  • 19-06-2018
int sum=0;
for(int num=10; num<=18; num+=2) {
   sum += num;
}
Answer Link

Otras preguntas

Thank you, please show me the steps.
The ____ is the high point of a play's action. denouement exposition climax complication theme
Your gender, whether you are male or female, is determined by the A) X or Y chromosomes, inherited from father. B) X or Y chromosomes, inherited from your moth
Mr. Grayson owns a wood company that sells trees. Mr. Grayson gets a request from a customer to buy a palm tree of a specific height. Mr. Grayson’s tree nursery
Presley is organizing the school book sale. Each stall will have 40 books on the shelf and 2 boxes of books with b books inside. Presley also has 200 books in i
calculate the loss on selling 50 shares of stock originally bought a 13 3/4 force and sold at 12.
Friction causes kinetic energy to be converted into what energy
What was the first video game to make a profit? A Pong B Pac Man C Tetris D Space Invaders
what creates more friction aluminum foil, wax paper or plastic wrap
Ceres is BEST classified as a(n) ___. a. asteroid b. meteoroid c. dwarf planet d. Kuiper Belt object