I have to write a program that generates 100 random integers between 0 and 9 stored into an array. Pass the array 10 different times to a function that traverses the array and counts how many times a particular value occurs in the array. I have no problem generating the array or passing it to the function; however, I'm stumped on the function that counts the particular values. Also, I have to use a for loop in the count function. Any help would be appreciated.
What I'm having problems understanding is how to only count certain values in function count. ie, first time count is invoked I want to return the value of how many zeros are in the array, second time count is invoked return the number of ones, etc.