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

How does Kepler's first law refine the Copernican model?
What is the resistance of a light bulb that uses 15 watts of power when placed across a 15-volt battery?
How did women's political status change from 1770 to today
Convert improper fractions to mixed. Number
Solve. 7/8p-1/4=1/2p
What is the resistance of a light bulb that uses 15 watts of power when placed across a 15-volt battery?
How do you find the derivative of y=arcsin(2x+1)y=arcsin(2x+1)?
what are two types of scientific investigations
what does bulto mean in spanish
Solve. 7/8p-1/4=1/2p