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

During the “Golden Age,” the Chinese were leaders in what industry?
The question is 7a +10 = 2a
solve the equation x+10=30
In a class of 47 students, the number of males is 7 less than twice the number of females. How many females and how many males are there in the class?
completely factor this polynomial: 16x2-25y2
Roberts heart beats about 72 times in 60 seconds . How many times does his heart beat in 15 minutes?
which graph represents a quadratic function with a negative discriminate
every tenth visitor to an ice cream shop gets free sprinkler. every twelvth visitor gets free hot fudge. which visitor each day will be the first to get both fr
A city located on the coast of North America has warmer winters and cooler summers than a city at the same elevation and latitude located near the center of N
Ideally, an “Enlightened Monarch” would _______________________________ . a. promote cultural change within colonized areas c. rule through divine inspiration b