Question: CODE in C++ PLEASE code the program in more basic C++ Write a program that merges the numbers in two files and writes all the

CODE in C++ PLEASE code the program in more basic C++

Write a program that merges the numbers in two files and writes all the numbers into a third file. Your program takes input from two different files and writes its output to a third file. Each input file contains a list of numbers of type int in sorted order from the smallest to the largest. After the program is run, the output file will contain all the numbers in the two input files in one longer list in sorted order from smallest to largest. Your program should define at least one function that is called with the two input-file streams and the output-file stream as three arguments. The list of numbers are not necessary of the same length. Aske the user for each file name and test if the file exit. Show the content of all three files on a screen

Sample input file 1:

22

44

55

77

99

500

Sample input file 2:

11

55

101

Sample output file:

11

22

44

55

55

77

99

101

500

This is how the complied program should look

CODE in C++ PLEASE code the program in more basic C++ Write

hi le Entering Tile names,please enter the Tile name fol lowed byextension. Enter the first of two input file names: inNamel.txt Now a second input file name i nName2.txt Enter the output file name WARNING: ANY EXISTING FILE WITH THIS NAME WILL BE ERASED outName.txt Contents of file inName1.txt are: 500 Contents of file inName2.txt are: 101 Contents of merged file, outName.txt are: 101 500 Press any key to continue

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!