Question: Complete the program minmax.cpp which uses two functions readdata ( ) and minmax ( ) to find the minimum and maximum of a set of
Complete the program minmax.cpp which uses two functions readdata and minmax to find the minimum and maximum of a set of floats stored in the file minmaxin.txt
The main program opens the input and output files, and allocates a float array then calls the functions readdata and minmax and finally prints the minimum and maximum values to the output file minmaxout.txt
The input file minmaxin.txt includes a single column of data, where the first number an int indicates the number of floats which follow. You can assume that the file holds no more than values.
The function readdata reads the first number, from the input file and then reads the following floats into the array.
The function minmax computes the minimum and maximum values found in the array.
Here is the expected program output:
The array has elements
The maximum value in the array is
The minimum value in the array is
File: minmax. cpp
Programmer :
Date :
include libraries
using namespace std;
const int maximum array size
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
