Ask Question
11 July, 02:56

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

+4
Answers (1)
  1. 11 July, 06:13
    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?
Find 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 you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers