emileemiller604 emileemiller604
  • 18-09-2017
  • Computers and Technology
contestada

Write a loop that asks the user to enter a number. the loop should iterate 10 times and keep a running total of the numbers entered.

Respuesta :

tonb
tonb tonb
  • 18-09-2017
int sum = 0;
int number;
for (int i=0; i<10; i++) { 
   printf("Enter an integer number: ");
   scanf_s("%d", &number);
   sum += number;
}

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

Answer Link

Otras preguntas

6.5 divided by 6804 or 6804 divided in to 6.5 plz help
solve each system by graphing: y=-1/2x+2 y=-3/2x-2
How many solutions does this system have! y = 3x + 5 y = -x + 4 a. one b. two c. infinite number d. no solution
características de laura el padre de laura y carmilla en le libro carmilla la mujer vampiro
please help 20 points. Marco went to the library. He checked out 6 movies. The rest of the items he checked out were books. He checked out a total of 17 items.
Which of the following best describes capt
I need a problem with 1/3 + 1/8. Something like "Jasmine buys 1/2 of apples but Pedro takes 1/4, how many apples does Jasmine have now? 1/4 of apples" (please b
witch ordered pair is the solution to the system of equations {-5x-3y=12 {y=x-12
-6x-14y=-20 -3x-7y=-10
How does a reader identify the tone of text