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 do volcanoes form at B?
True or false proteins are liquids
pls help me with the blanks and the questions c,d and e...pls help asap...answer needed urgently...tia
The bike shop charges $10 for flat tire repair and $40 for a full tuneup. The total receipts for services was $3000. 10 tuneup’s were done. How many flat tires
A copper wire is 1 meter long at a temperature of 20°C. What will be the length of the wire at a temperature of 50°C?
what’s the answer 3 1/3-2 5/12 ???
Where can students view video tutorials, discussions, and blogs related to a number of different subjects?Where can students view video tutorials, discussions,
A 750 watt hair dryer is used for 60 seconds how many joules of energy are used
PLEASE ANSWER FOR BRAINLIEST!!! PLEASE ANSWER ASAP What are the reasons that have people prompting to apply to a university?
What happens when water’s salinity increases? Mass decreases. Freezing point decreases. Buoyancy of objects decreases. The amount of dissolved minerals decrease