Page 1 of 1

In this lab, we will practice: Write a C++ program that reads the values from a data file, display the values, and compu

Posted: Thu Jul 14, 2022 2:12 pm
by answerhappygod
In this lab, we will practice:
Write a C++ program that reads the values from a data file,display the values, and computes and displays the mean and standarddeviation of these values.
For this program, you are reqired to write two user definedfunctions:
lab8-1.dat file
30-40256489103458934-21563
lab8-2.dat file
500430240-390-230100394444882-30-29683732990-53893
Here are two example runs of the program when the data file tobe opened is specified using the statement:
Sample run 1
Enter the data file name: lab8-1.dat
The values read are: 30 -40 25 64 89 103 45 89 34 -2 15 63
The mean is 42.92. The standard deviation is 39.74.
Sample run 2
Enter the data file name: lab8-2.dat
The values read are: 500 430 240 -390 -230 100 394 444 882 -30-29 683 732 990 -538 93
The mean is 266.94. The standard deviation is 431.56.