my code asks the user for a number N
then it asks the user again for N numbers
it sorts the numbers ascending and print's it with the number of occurrences.
prints:
How many integers should I collect? 5
1: 2
2: 4
3: 4
4: 5
5: 6
2: 1
4: 1
4: 1
5: 1
6: 1
how I want it to print:
How many integers should I collect? 5
1: 2
...
User Profile
Collapse
-
How do I print the occurrence of the number once?
-
How do I create a user defined array size?
I'm trying to create a program that prompts the user for a number N. This number will be used to prompt the user N times to provide an integer.Last edited by maggiexoxo; Apr 27 '13, 03:41 AM.
No activity results to display
Show More