Answer:
Explanation:
The solution code is written in Java.
Firstly, create a numArr array with 51 elements (Line 6).
Next, use do while loop to repeatedly prompt user for an input number between 0 - 50. If num is between 0 - 50, use the input number as index to increment that particular element of array by one (Line 10 - 15).
At last, create another for-loop to traverse through the numArr array and print all the elements with value at least one (Line 18 - 21).