# Exercise 5
Find average of numbers from 200 to 500, inclusive.
How to calculate the average of some values?
To find the average, add up all the numbers in the range. Then divide the sum by the number of entries. For example, you can calculate the average of 2, 5, 7, 13 using this formula:
# Hint
To calculate the number of entries, initialize a variable and keep incrementing it. For example to calculate the count of numbers between 13 and 78, inclusively,
int count = 0;
for (int i = 13; i <= 78; i++)
{
count++;
}
Console.WriteLine("There are {0} numbers between 13 and 78, inclusively.", count);
1
2
3
4
5
6
2
3
4
5
6
← Exercise 4 Exercise 6 →