Read a list of double numbers from the file Assignment.6.data.txt Caluculate the
ID: 3617929 • Letter: R
Question
Read a list of double numbers from the fileAssignment.6.data.txt
Caluculate the sum, average and standard deviation of thesedatat:
25.3 96.67 105.2 42.1 65.5 2.11 -67.1234 8.9 -19.0
The standard deviation is (( ni - a)/ N)1/2whre
is the sum
ni are the numbers
a is the average N is the the number of numbers
store the results in a file you create
Assignment.6.results.txt Read a list of double numbers from the file Assignment.6.data.txt Caluculate the sum, average and standard deviation of thesedatat:
25.3 96.67 105.2 42.1 65.5 2.11 -67.1234 8.9 -19.0
The standard deviation is (( ni - a)/ N)1/2whre is the sum ni are the numbers
a is the average N is the the number of numbers
store the results in a file you create
Assignment.6.results.txt a is the average N is the the number of numbers store the results in a file you create Assignment.6.results.txt
Explanation / Answer
please rate - thanks #include #include #include using namespace std; double mean(double [],int,double&); double standardd(double[],int, double); double calc(int, double); int main() {double x[100]; int i=0,j; double average,sd,sum=0; ofstream out; ifstream in; in.open("Assignment.6.results.txt"); if(in.fail()) //is it ok? { coutx[i]; while(in) { i++; in>>x[i]; } outRelated 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.