lwilliams2954 lwilliams2954
  • 17-02-2018
  • Mathematics
contestada

Associate the average of the numbers from 1 to n (where n is a positive integer value) with the variable avg.

Respuesta :

pbzepplin
pbzepplin pbzepplin
  • 27-02-2018
This is a simple programming question. To calculate the average of any two numbers, where one number is 1 and the other is n, simply add the two numbers and divide by 2. Therefore, the answer is:
avg = (1 + n) / 2 
Answer Link

Otras preguntas

While at the junkyard, what does Cinder notice about Peony?
What promise by the seller assures that they own and possess the property with the right to transfer title?
Why is the Sources tool considered your "marketing compass"?
While he is giving a presentation at a community center on depression, Israel hosts a Q&A session. One of the participants asks Israel a question: So is dep
Which law(s) passed by Parliament stimulated colonists to organize the First Continental Congress? the Tea Act the Coercive (or Intolerable) Acts the Quartering
Tim Jenkins borrowed $820.21. He paid $19.48 in interest on this 90 day loan. Using exact simple interest at what rate did he borrow?
What major text structure does Malala commit to using in this excerpt from her memoir? Why do you think that she chose to use that structure? How do other types
Labtech, a laboratory equipment corporation, is considering entering the business of making soundproof rooms. This will require an initial investment of $80,000
is cellular respiration anabolic or catabolic
In the book, A Wish in the Dark, what color light was considered the best light?