Output
Variable Name     Value in Memory
         n
         numbers[0]
         numbers[1]
         numbers[2]
0.0
0.0
0.0
         sum
         average
         count
  1  #include <iostream>
  2  using namespace std;
  3  
  4  int main()
  5  {
  6    const int NUMBER_OF_ELEMENTS = 3;
  7    double numbers[NUMBER_OF_ELEMENTS];
  8    double sum = 0;
  9  
 10    for (int i = 0; i < NUMBER_OF_ELEMENTS; i++)
 11    {
 12      cout << "Enter a new number: ";
 13      cin >> numbers[i];
 14      sum += numbers[i];
 15    }
 16  
 17    double average = sum / NUMBER_OF_ELEMENTS;
 18  
 19    int count = 0; // The number of elements above average
 20    for (int i = 0; i < NUMBER_OF_ELEMENTS; i++)
 21      if (numbers[i] > average)
 22        count++;
 23  
 24    cout << "Average is " << average << endl;
 25    cout << "Number of elements above the average " << count << endl;
 26  
 27    return 0;
 28  }