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

what made you feel when Elsa aimed the hand full of ice at ana and made her unconscious in the movie frozen?
Judging from appearance, I should say he is a wealthy man.(begin :if.... )​
What does Lincoln wish to do through this inal sentence of the speech?
How does the Appalachian Mountains important to the US development
Can you help me solve this please
Which expressions are equivalent to 2 Superscript 5 times 2 Superscript 4? Check all that apply.
Your organization has started receiving phishing emails. You suspect that an attacker is attempting to find an employee workstation they can compromise. You kno
Suppose that the price of a rental car (Prc) is $50 while the price of a flight (Pfl) is $85. Also, suppose that the marginal utility of a rental car (MUrc) is
When McCarthy says. "Today we can almost physically hear the mutterings and rumblings of an invigorated god of war. You can see it, feel it, and hear it all th
can you help me with these algebra problems please