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

Evaluate. 58−(14)2= ________
6x-1=11 solve equation
A popular Mexican American studies program was banned by the state of ________, which accused it of causing resentment of white people.
What are atoms that vary in the number of neutrons found in their nuclei called?
The average heights of x number of girls and 15 boys is 123. if the average heights of boys is 125 and that of girls is 120.find number of girls.​
what is the color of dilute hydrochloric acid when we use the universal indicator ? only given that it is corrosive
Vincent Crabbe hung a birdhouse in his backyard; he put food in it every day. Complete thought Incomplete thought anornroblem​
Which of the following statements regarding when and where online consumers shop and buy is most accurate? a. Eighty percent of online sales occur on weekdays.
In a football game, Jim's team gained 7 yards on the first play, lost 2 yards on the second play, and lost 10 yards on the third play. How many total yards did
A delivery driver reported that he was 280 miles away from headquarters. The driver can expect to travel 50 miles per hour. How long will it take to return?