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)
Any help is much appreciated. I have seeked out all possible help I have around me, I have sat in front of this computer for hours. I just need some kind of break through or I might go crazy!
int main()
{
using namespace std;
char first_infile[21], second_infile[21], out_file;
ifstream in_stream;
ofstream out_stream;
cout<<"Please give me the first input file name (maximum of 20 characters)."<<endl;
cin>> first_infile;
cout<<"Ok i will use this file name:"<<first_infile<<endl;
cout<<"Please give me a second input file name (maximum of 20 characters)."<<endl;
cin>> second_infile;
cout<<"Ok i will use this file name:"<<second_infile<<endl;
cout<<"Now please give me an output file name (maximum of 20 characters)."<<endl;
cin>> out_file;
cout<<"Ok i will use this file name:"<<out_file<<endl;