Can anyone explain to me how to count the number of occurrance of any number? Say for example I inputed this into my program:
1 -3 -3 1 2 4 6 1
Then my program should print this with the result in descending order:
6 occurs 1
4 occurs 1
2 occurs 1
1 occurs 3
-3 occurs 2
Any ideas?