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

Write a program that: 1. Ask the user for names of the two iput files and a name

ID: 3656269 • Letter: W

Question

Write a program that: 1. Ask the user for names of the two iput files and a name of an output file. The two input files contain integers in any order. Eachimput file contains no more than 20 integers. 2.Create two arrays of integer of size 20. One for each input file. 3. Read in the numbers from the imput files into the arrays respectively. 4. Find the smallest and the largest numbers from the two input files and writes the answers into a third file - output file. 5. Find the average of all numbers and write to the third file (output file.) Each input file contains a list of numbers (no more than 20 numbers) of type int separated by a space. (The number of data in each file is not fixed. They also could be in any order)

Explanation / Answer

#include #include #include using namespace std; void createtestfile(){//for testing purpose string datA="3 8 9 3 2 1 2 3 0 40 39 22 34 1 2 3 4 56 19 20"; string datB="1 2 3 4 5 6 7 8 9 10 11 12"; ofstream make("testfileA.dat"); make
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote