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

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!