Count how many times a specific value occurs in an array.
Lists
You may complete this code challenge using a list.
Enter the size of your collection: 6 [Enter]Enter element 1: 5 [Enter]Enter element 2: 3 [Enter]Enter element 3: 5 [Enter]Enter element 4: 7 [Enter]Enter element 5: 5 [Enter]Enter element 6: 8 [Enter]
Enter the value to count: 5 [Enter]The value 5 appears 3 times in the collection.