Use the code in the first part of that thread to collect the numbers.
Rewrite the second part of the code to print one line for each element in the array.
For the first attempt, print the number, the | and the count.
When that works, work on the code to replace the count with a row of #s
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad: