Write a program that reads a file containing integers and uses map to display the distinct (unique) numbers in the file, named input.txt, with their frequencies. For example, you can consider input.txt contains the following: 23 24 12 4 54 12 3 54 23 The output should be: 3:1 4:1 12:2 23:2 24:1 54:2
Aucun commentaire:
Enregistrer un commentaire