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 action would not keep you safe during an earthquake? covering your head and neck with your arms going outdoors and taking shelter near a building going
How did Muslim Turks influence turkeys development?
Hiding in the brush, the leopard was not seen by the hunters This sentence contains a _____. participle, incorrectly punctuated participle, correctly punctuat
The average adult eats about 4000 calories a day
I need help can someone help me
2. The action of abrasion can best be described as _____. A. windblown sand cutting and polishing exposed rock surfaces B. coarse sand particles rolling along
the allele for attached earlobe is recessive. In the third generation, what are the odds that a carrier father and homozygous dominant mother will have ta child
you answer 95% of the quedtions coretly on a 40-question test.How many questios do you answer incorrectly?
tyrone made 37 baskets out of 71 attempts. about what percent of his shots did he miss
On what criteria is the Fujita scale for Tornadoes based? Question 11 options: Duration of storm Wind Velocity Storm surge height Amount of Destruction