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

Which statement best describes the composition of magma? A. Magma contains only three elements. B.Magma contains the same element's as snow. C.Magma contains th
HOW DID RAILROADS BENEFIT WESTERN CATTLE RANCHERS?
A container holds a combination of nickels and quarters. There are 156 coins in all, and their total value is $21.60. The system of equations models this situat
Tectonic plates can include
Which statement best describes the caste system?    need help asap so i can go on christmas break A. the Hindu belief that life is a cycle of birth, death, and
What are all the factors of 27
How do you find the mass of a free body diagram
Why do the noble gases not form compounds readily?
How do you simplify 50/32
“Does remembering bad things that happen to us lead to hope or despair?”