Write separate code for each task
1) Fill array with random number
2) Search lowest number
3) count how often this number is in the list.
(You can do 2 and 3 in one step, but it may be easier to do 2 steps)
If your teacher told you about procedures, then each of those is one procedure (or function).
For each try to get some code, then ask again.
READ THE REST, ONCE YOU GOT THE ABOVE
4) Now find the 2nd lowest number... (and I guess then the 3rd lowest and so on)
That requires some thinking.
- The 2nd lowest number is the lowest number, if you ignore the previous found lowest.
- the n-th (3rd, 4th ...) lowest number is the lowest number, if you ignore the previous n-th.
So when going through the list to find the n-th lowest, you do
- check element at index i:
- is bigger that last found ?
- is lower that others in the list