Question: Question 4 in C++ please Uompiere the programm max.cpp which uses two TUNCTIONS Teaccata ana mwax to find the maximum and minimum of a set

Question 4 in C++ please

Question 4 in C++ please Uompiere the programm max.cpp which uses twoTUNCTIONS Teaccata ana mwax to find the maximum and minimum of a

Uompiere the programm max.cpp which uses two TUNCTIONS Teaccata ana mwax to find the maximum and minimum of a set of floats stored in the file minmaxin.txt. You can assume that the number of values in the file is less than 100. The first number in this file is an int indicating the number of floats which follow. The function readdata() opens the input file minmaxin.txt, reads the first number, n, and then reads the following n floats into an array. The file is then closed by the function. The function minmax() computes the minimum and maximum values found in the array. The main program prints the maximum and minimum. The content of the output file minmaxout.txt will be: The array has 80 elements The maximum value in the array is 63.606 The minimum value in the array is 4.8089 /* File: minmax.cpp Programmer: Date: #include #include using namespace std; const int MXN = 100; // marimum array size /* function prototype */ void readdata ( /* you fill in here */); void minmax(/* you fill in here */); int main(void) ofstream outfile ("minmaxout.txt"); float x[MXN); int n; float max; float min; // the array // the actual array size // the marimum // the minimum /* read the data into the array */ readdata/* you fill in here */); /* compute the marimum and minimum */ minmax /* you fill in here */); tfile

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!