Question: Please do all parts and show all work. Provide code in C++. Write a program that will search a file of numbers of type int
Please do all parts and show all work. Provide code in C++.
Write a program that will search a file of numbers of type int and write the largest and the smallest numbers to the screen and also to an external file. The output should be of this form: The smallest number is: The largest number is: Make sure that you send the output to the screen (using cout statements, for example).
The file contains nothing but numbers of type int separated by blanks or line breaks. Note that the file could be quite long. You should NOT assume what the size of the input file is. The input filename will be input.txt . The output will be output.txt . The input and output file will be in the same directory as where I will download your program to.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
