C++ Homework to be done
i want someone to do this assignment for me.. its only a question..
i need it in 6 hours..
3) Write a C++ program that calculates the average of measurements of Oak tree leaves.The measurements are in a text file called oakIn.txt. The file is provided to you on the blackboard. Follow the following requirements
1. Declare an array to hold the data in the main() program.
2. Write a function to read the data from the file into that array (ReadFile()) and call it from main(). The function should return TRUE if the file was successfully opened and read. It should return FALSE otherwise; i.e. if it encounters any problem.
3. Write a function called FindAve() that returns the average of the leaves’ measurements stored in the array. Call this function from main() and pass it the array that contains the data.
4.Within main(), after data is read in and average leave length is calculated, write code that opens an output file named oakOut.txt and writes into it a statement that includes the calculated leaves average length value; something like this
Average leaves length was calculated to be x.xxx.
the input file for this assignment..
CPP Phone Company_x000D_ John Doe_x000D_ 2016_x000D_ 12.4_x000D_ 23.1_x000D_ 34.6_x000D_ 32.4_x000D_ 52.3_x000D_ 21.5_x000D_ 23.7_x000D_ 45.3_x000D_ 23.4_x000D_ 51.3_x000D_ 45.2_x000D_ 23.7
Need help with writing C++ Homework to be done?Get help