i need help with this homework, i tried to do it many times but still the outputs are wrong,
help is appreciated.
Write a program that reads integers, finds the smallest of them, and counts
its occurrences. Assume that the input ends with number 0. Suppose that
you entered 30 50 20 50 20 50 100 0; the program finds that the smallest is
20 and the occurrence count for 20 is 2.
If the occurrences of the smallest number is greater than 1, print the value
of the number and the number of occurrences. However, if the smallest
number occurrences is equal 1, print only the value of the smallest number.
Note: the occurrences of a number means how many times this number has
been entered in the input.