Medium
Report Bad Lines
Read n lines, each should be an age (whole number). For each bad line print
line K: not a number (K from 1). At the end print the average of the good ages with 1 decimal, or no valid ages.Input
n, then n lines.
Output
Lines.
Sample 1
Input
3 15 x 20
Output
line 2: not a number 17.5
Sample 2
Input
1 abc
Output
line 1: not a number no valid ages
Output appears here