Question: got stuck coding 9 1. Given the following text file data.txt. Write a complete program to use the following main function. Your program must create

got stuck coding
got stuck coding 9 1. Given the following text file "data.txt". Write
a complete program to use the following main function. Your program must

9 1. Given the following text file "data.txt". Write a complete program to use the following main function. Your program must create the give 10. The Display function is overloaded const int N=6; int main() 44 int a[N]; 33 //Copy data from file into array a 19 CopyData("data.txt", a); //Display array a 70 Display( a); 11 //Find and display the average of numbers in array a float Average=FindAve( a ); cout= average Display a, Average); //Find and display the maximum and minimum numbers in array a int max, min; Sample 1/0 FindMaxMin(a, max, min); This is array a: 44 33 19 9 70 11 Display(max, min); Average = 31.00 //sort array a Data values above average:44 33 70 sort(a, a+N); Maximum = 70 //display the sorted array a Minimum - 9 Display(a); terminate program This is the sorted array a:9 11 ....70 return 0; } 2. Given the following text file "data2.txt", and declarations const int N-5: Martin-Smith 22 2.2 Austin-Clinton 18 3.1 struct RECORD Johnson 19 2.9 string Name; Maggie-Jones 23 2.3 int Age: Tyler-Brown 163.4 float Gpa; RECORD P[N]; float GpaAve; a. Read data from the file into array p. CopyRecords("data2.txt", p); b. Display all records Display(); c. Compute their age and GPA average: AgeGpaAverage P, AgeAve, GpaAve); d. Display both averages: Display(AgeAve, GpaAve); Sample Output: This is the content of array Name Age Gipa Martine-smith 22 22 Their AGE average is xxxx and their GPA average is a This is way 12345 3. Given the following arrays: This is inst a[5]"{1.2.3.4.5): 5675 int b[3][4) - {1,2,3.....12): 10 11 12 int [2]31|21- {1,2,3......12): This was We want to display cach array using the following calling statements cout

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!