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.
In this lab, we will practice: Write a C++ program that reads the values from a data file, display the values, and compu
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
In this lab, we will practice: Write a C++ program that reads the values from a data file, display the values, and compu
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!