Question: Given the following text file data.txt. Write a complete program to use the following main function. Your program must create the give VO. The Display
Given the following text file "data.txt". Write a complete program to use the following main function. Your program must create the give VO. The Display function is overloaded. 1. const int N=6; int main() f int al N ]; //Copy data from file into array a //Display array a //Find and display the average of numbers in arraya 19 CopyData "data.txt", a); Display( a ); float Average=FindAve( a ); 70 coutAverage ="= average Display (a, Average); //Find and display the maximum and minimum numbers in array a int max, min FindMaxMin(a, max, min); Display(max, min); Sample I/O This is array a: 44 33 199 70 11 Average = 3 1.00 Data values above average:44 33 70 Maximum = 70 Minimum = 9 This is the sorted array a:9 11....70 //sort array a sort(a, a+N); //display the sorted array a Display(a); /terminate program return 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
