Write a program (not a function) that repeatedly takes in user input representing daily rainfall measurements (non-negative integers) until it encounters the integer 99999. The program should output the average of the numbers encountered before 99999. Ignore negative numbers and any user input that is not made up entirely of digits. If no valid numbers are entered, then print out 0 instead.