Question: Greater - Than Counter Write a program in question _ 5 ( ) that reads a user - specified file of floating - point numbers,

Greater-Than Counter
Write a program in question_5() that reads a user-specified file of floating-point numbers, and counts how many of
those numbers are larger than a user-specified threshold.
You can see from the example output below that the program determines the number of numbers/lines from reading
the file.
Your program should work for any file of numbers (one per line) of any size.
The example below has 10 lines, but yours might have 365 or 2 or...
We ALWAYS write algorithms and code to solve general problems (within reason), so you rarely hard-code something
like the length/size of a file.
Example file:
Copy the numbers below into a new file called recentrain.txt ,
or download recentrain.txt here.
12.4
10.0
10.1
0
8.4
13.9
19.1
141.0
33.5
1.2
Example output:
Filename: recentrain.txt
Threshold: 13.9
Processing...
3 out of 10(30.0%) values in recentrain.txt are greater than 13.9.
 Greater-Than Counter Write a program in question_5() that reads a user-specified

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!