Write a C++ program whichconsists of a main function and one void function calle
ID: 3614597 • Letter: W
Question
Write a C++ program whichconsists of a main function and one void function called myfun(double numb[ ], double& maxn, double&minn, double& aver).
The main function should:
a. Read 10 values from a data file calledtestdata.txt, found by clicking here, and store them in an array callednumb.
b. Call the void function myfun. Thefunction myfun determines the largest numberin numb, the smallest number innumb, and the mean (average) of the numbersin numb. myfun thenreturns these three values to the main program as arguments of thefunction.
Explanation / Answer
please rate - thanks #include #include #include using namespace std; void myfun( double[], double&, double&, double&); int main( ) {double numb[10],maxn,minn,aver; int i,max=10; ifstream input; input.open("testdata.txt"); if(input.fail()) { coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.