i would like to check an array for a specific range of values.
ie, the range of values is from 0 --> 9 and the actual array is 50 elements large.

i also want to keep track of how many of each value there is.
ie, if there are 3 zeroes, 8 ones and 5 two's, then my final vector should look like, 3 8 5.

i was able to solve it with the code below BUT, i realized that my range values needs to be equal to my array size, otherwise it does not check all elements.

is there a better way to do this?

```
int main() {

int intensityRange = 10;
int cloudSize = 10;

int cloud [] = {0, 3, 3, 2, 1, 5, 2, 3, 5, 2};
vector <int> totalGreyValues;
int k = 0;

for (int i = 0; i < intensityRange; i++) {
   for (int j = 0; j < cloudSize; j++) {
      if (cloud[j] == i) {
         k = k + 1;
         cout << "   " << k;
      }
      else
        cout << "  no match  ";
   }
   totalGreyValues.push_back (k);
   k = 0;
}

cout << endl << endl << totalGreyValues.size();

for (int h = 0; h < totalGreyValues.size(); h ++)
   cout << "   " << totalGreyValues[h];

// values --> 0 1 2 3 4 5 6 7 8 9
// answer --> 1 1 3 3 0 2 0 0 0 0 

return 0;
}

```