Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Thank You for helping Problem Statement Sorting and Merging Numbers Program Design an algorithm that will sort and merge two lists of integer values Your

image text in transcribed

Thank You for helping

Problem Statement Sorting and Merging Numbers Program Design an algorithm that will sort and merge two lists of integer values Your program should use the following functions listed in the table below. Do not change the assigned tasks of the functions, and do not add, delete, or change the The program will read the two integer lists from two different files. Make sure there are not any duplicate values within the same file. However, the same values can be in both files functions'parameter variables. In addition, the parameters listed in red, are passed by-reference Note: Arrays are always passed by-reference. The program will use two arrays, one to store each list of integers. Note: This problem can be solved with two arrays. Do not use more than two arrays in your solution. .You can create any additional functions that you feel are helpful. . The number of values in the files can vary. Ho wever, the program should not read more than twenty integer values. Display a welcome message and then prompt the user for the two input filenames and an output filename. Display error message(s) if you cannot open any of the files. Ifall of the files open successfully, then perform the following Function Prototypes void displayProgramInfo ) int readData (ifsteam& inFile, int numData],int size); void sortData (int numData [], int size) void writeData (ofsteam& outFile, const int numDatal [], * Read the files and store the values in the arrays. * Sort each array so the values are in ascending order (low-to-high). const int numData2 [1, int sizel, int size2) Using both arrays, write a single list of numbers in ascending order to the output file. Do not write duplicate values to the output file. Display a message that the list was successfully created. Close all the files before the program exits

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Multidimensional Array Data Management In Databases

Authors: Florin Rusu

1st Edition

1638281483, 978-1638281481

More Books

Students also viewed these Databases questions