Question: using C++ please Question 2_[File I/O with numbers]: An input file is formatted as follows: the first number is the number n of values in
Question 2_[File I/O with numbers]: An input file is formatted as follows: the first number is the number n of values in the text file, followed by n numerical values. Write a CH program that reads the contents of the file save it into an array, finds the summation, maximum and minimum of the n values, and finally print the elements in reverse order. The program will print its findings to an output file named output.txt. Sample input and output files are shown below: output.txt input.txt + x Source.cpp 1 7 2 22.2 1.365 6 9.443 3 1.232 5.3 4.34 4 output.txt + X input.txt Source.cpp 1 Min 1.232 2 Max = 22.2 3 Sum = 49.88 Array in reverse is : 4.34 5.3 1.232 9.443 6 1.365 22.2 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
