Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This is a C++ program. My instructor give me all the information below for suppo

ID: 3767740 • Letter: T

Question

This is a C++ program. My instructor give me all the information below for supporting.

25 values

5.345
2.748
1.582
4.372
3.502
4.294
0.678
3.729
6.000
5.398
2.901
5.234
3.892
4.909
1.971
3.691
0.698
1.894
5.432
4.289
3.789
1.951
4.281
0.900
5.399

30. Create a data file with twenty-five values (one value per line) that represent the length of an oak leaf. (Hint: can you write a program to do this for you?) Have the values range from 1.000 to 6.000 (here 3 decimal places) inches in the x.xxx format. Write a program that declares an array that will hold these twen ty-five values and pass the array to a ReadFile function. The ReadFile func tion asks the user for the name of the leaf file. It returns a Boolean indicating file open/read status. That is, it returns a false if the program was unable to open the file, a true if the file was opened and successfully read, filling the array. Pass the array to a FindAve function which returns the average value. Next, sort the array using a modified Sort function from Program 6-6, page 309. Send the array and average to the Write function that writes the average values, the three largest and three smallest leaves.

Explanation / Answer

i didn't got what help you want

you got all the code

just you need to execute it

i have checked the execution

it is working fine

here are the input and output files

inputfile:

5.345
2.748
1.582
4.372
3.502
4.294
0.678
3.729
6.000
5.398
2.901
5.234
3.892
4.909
1.971
3.691
0.698
1.894
5.432
4.289
3.789
1.951
4.281
0.900
5.399

output file:


Oak Leave Results

Average value of our 25 leaves: 3.555

The 3 smallest are: 0.678 0.698 0.900

The 3 largest are: 5.399 5.432 6.000

Not requested, but just to double check,
here are the 25 sorted leaves
0: 0.678
1: 0.698
2: 0.900
3: 1.582
4: 1.894
5: 1.951
6: 1.971
7: 2.748
8: 2.901
9: 3.502
10: 3.691
11: 3.729
12: 3.789
13: 3.892
14: 4.281
15: 4.289
16: 4.294
17: 4.372
18: 4.909
19: 5.234
20: 5.345
21: 5.398
22: 5.399
23: 5.432
24: 6.000

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote