Write a program that has an array of integers as below:
-12, 3, -12, 4, 1, 1, -12, 1, -1, 1, 2, 3, 4, 2, 3, -12
The program should counts the number of occurrences of each array element. Output a two-column list where the first column is a list of the distinct array elements and the second column is the count of the number of occurrences of each element.
All 2 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.