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 of the following statements is true? A. Store brands are better quality. B. Store brands are cheaper than national brands. C. Store brands are more expens
Please answer I can’t retake!
Which of moms actions in lines 15 through 20 best shows that she is a wise judge?
Which planet likely has flowing liquid metallic hydrogen as the source of its magnetic field? 1.Mars 2.Saturn 3.Venus 4.Neptune
which of the following is a unit if measurement in the metric system
What is a complex sentence? A. a group of words containing a subject and a verb that cannot stand alone as a complete sentence B. a sentence with no subject C.
The nurse recognizes which symptom as a classic sign of cardiogenic shock?
keeping in mind the kinetic energy of a moving vehicle how can a diver best prepare to enter sharp curves in the roadway
Which describes the role of a vassal
Which field of psychology intertwines with law enforcement and criminology? A). educational psychology B). forensic psychology C.) industrial psychology D). dev