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

Florida recorded __________ DUI violations in 2009.
ASAP MARK BRAINLIEST!! ALL PROBLEMS PLS SHOW WORK THX
What are the main reasons why excess weight affect physical fitness
When I add 2 plus 2 do I get 4 am or 5
which of the points shown is on the x-axis?1.point z2.point w3.point v4.point x​
what is the difference between an autopsy and an external examination​
I spent $4.25 for lunch every school day for a week. On Saturday I spend $5.75 . How much do I spend in all?
Sam bought a new hobo kayak for 2100 if the tax is 9% of the price how much tax will be paid?
If you are standing on a beach right next to the ocean, what is your elevation?
That is 5 multiplied by it.. Someone please help, I have no clue what I’m doing... Marking Brainliest