Ask Question
16 October, 05:23

Associate the average of the numbers from 1 to n (where n is a positive integer value) with the variable avg.

+1
Answers (1)
  1. 16 October, 05:55
    0
    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
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Associate the average of the numbers from 1 to n (where n is a positive integer value) with the variable avg. ...” in 📙 Mathematics if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers