Menu

[Solved]7 Name Name Today S Date Lab 8 Inc Lude Include Q37199769

/7 YOUR NAME // MY NAME // Todays Date // Lab 8 #inc lude #include <iostream» <cmath> //included for some pre-defined functiInstructions An extension of the lab you did (maybe) last week. 1. Copy the lab8.cpp file to your folder a. You need to write

/7 YOUR NAME // MY NAME // Today’s Date // Lab 8 #inc lude #include <iostream» <cmath> //included for some pre-defined functions using namespace std; //function PROTOTYPES will go here //DO NOT CHANGE ANYTHING IN THE MAIN FUNCTION!! int main() //Defining variables to store the values, the mean and the standard deviation double xl, x2, x3, x4, x5; double mean, stDev; // calling all the functions getValues (xl, x2, x3, x4, x5); mean calcMean(x1, x2, x3, x4, x5); calcDev (mean, stDev, xl, x2, x3, x4, x5); printResults (mean, stDev); // asks and reads in the 5 values. //calculates the mean //calculates the standard deviatiorn //displays the results return 0; //the function DEFINITIONS will go below Instructions An extension of the lab you did (maybe) last week. 1. Copy the lab8.cpp file to your folder a. You need to write the definitions for the 4 functions called in the main function NOTE: some parameters will need to be reference parameters) 2. a. getValues asks the user to input the 5 values b. calcMean returns the mean (average) of the values c. calcDey calculates the standard deviation of the 5 values using this formula: (x1 – mean)2 + (x2 – mean)2 + (x3 – mean)2 + (x4 – mean)2 + (x5 – mean)- 5 d. printResults prints out the results A sample run: GC:Windows system32lcmd.exe Please enter 5 numbers: 5 7 9 11 13 The mean of the 5 values is:9 The St. Dev. of the 5 values is: 2.82843 Press any key to continue . . . Show transcribed image text /7 YOUR NAME // MY NAME // Today’s Date // Lab 8 #inc lude #include

Expert Answer


Answer to /7 YOUR NAME // MY NAME // Today’s Date // Lab 8 #inc lude #include … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *