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

You throw a baseball directly upward at time t = 0 at an initial speed of 12.3 m/s. What is the maximum height the ball reaches above where it leaves your hand?
LATIN HELPPPPPPP Read the paragraph in English and substitute the Latin pronoun in the correct case and number. Have you (singular)ever thought about being an
HELP ME FR FR FR PLEase
A boy with an extra X chromosome probably has which of the following syndromes?
The Arizona Department of Transportation wishes to survey state residents to determine what proportion of the population would like to increase statewide highwa
A transverse wave is traveling on a string stretched along the horizontal x-axis. The equation for the vertical displacement y of the string is given by y = (1.
How can you become a comic artist as a teenager?
if f(x) = x+8 and g(x) = 4x- 3, find (f+g)(x)
When the volume and number of particles of a gas are constant which of the following is also constant
Describe the response the kidneys have to dehydration and excessive water intake. What happens to the concentration of urine in each case ?