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

True or false: In the sentence, She loves chocolate and hates to eat anything else, she is a pronoun
What are fallopian tubes and how do they work? Also what is the egg? ALso what is sperm?
Directions: Graph each inequality on the number line. 1. x > -5 2. n < 17 3. k < -1
Suppose you went towhatvare the slope and y intercept of -12x+11y=-8
1)What changes occurred over time that were directly related to this event winter of valley forge and what changes occurred over time that were indirectly relat
Please help. ASAP. Thanks
Brainliest Yesterday, Carrie shared her lunch with Becky's friend. Which identifies the antecedent for the underlined personal pronoun? yesterday Carrie lunc
Please help!!! What happens when sunlight bends as it passes through raindrops ? A) The wavelength of UV rays increase B) The wavelength of the visible light
what does it mean to annotate a passage?
I'm confused. Please help! brainly and 25 points The cost of renting a car for a day is $0.50 per mile plus a $15 flat fee. What does the graph of this equation