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

Which graph represents the solution set of the system of inequalities? {y<2/3x {y≥−x+2
How did the geography of ancient China impact its culture
Less than and greater than
essential question memo
what is the answer to 6 divided by 43 grounded
According to the rule of 72, which statement is true? An investment of $3,100 will double in 12 years at a compound interest rate of 5%. An investment of $
What does analysis mean?
What is the instantaneous acceleration of the particle at point B? https://cdn.app.edmentum.com/EdAssets/59f9a9d574964702a0852b4f48c253d3?ts=636050305314030000
Which of the following temperatures is the coldest? 5° 0° −15° −7° 32° A. 5° B. 0° C. −15° D. −7°
Write the equation of a line that is perpendicular to y = 0 . 2 5 x − 7 y=0.25x−7y