Matching a Target Range
Riverbend Supply's server room has a comfort band. The air counts as in-band only when it is warmer than 65 degrees and cooler than 75. Both edges are exclusive: a reading sitting exactly on 65, or exactly on 75, is out of band. The facilities report says how many of the day's checks found the room inside that band, and the sensor hands over one reading per check, in the order the checks were made.
Task: Print how many readings fall inside the band.
Input
The first line holds a single integer n, the number of readings. Each of the next n lines holds one temperature in degrees Fahrenheit, which may carry decimals.
Output
One line holding the number of in-band readings, as a whole number. If none qualify, print 0.
Example:
Input:
5
60
68
72
75
80
Output:
2
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in