Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I hope this question is clear;my sample code is below the problem. I would be so

ID: 3651556 • Letter: I

Question

I hope this question is clear;my sample code is below the problem. I would be so thankful if someone could show me the correct code for this problem. This is the full problem that I am trying to work out, but am struggling to do:



Write a program minmax.cpp (in C++) which reads a file of floating point numbers and prints
the number of numbers in the file, the minimum number and the maximum number.





1. Prompt and read in the input file name. Read and store the file name as a C++ string.
Include the C++ command

Explanation / Answer

#include #include using namespace std; int main() { ifstream myReadFile; myReadFile.open("text.txt"); float output; int number =0; float max = -9999999.0; float min = 999999.0; if (myReadFile.is_open()) { while (!myReadFile.eof()) { myReadFile >> output; number++; if(output max ) max = output; } } myReadFile.close(); cout