Question: Need flowchart for the following program. 1. Write a complete C++ program that calculates Standard Deviation using data from input file called: grades.txt. 2. Use

Need flowchart for the following program.

1. Write a complete C++ program that calculates Standard Deviation using data from input file called: grades.txt.

2. Use data in the example above to populate the data file: grades.txt

3. Output the average and the standard deviation to an external file called: results.txt.

4. Hints: The sqrt function is located in the cmath library. Use casting where necessary.

5. Hints: Utilize dowhile or while loop in conjunction with file I/O.

6. Increase your program modularity by implementing functions so the main contains only function calls.

path of the file D:\\grades.txt)

9 2 5 4 12 7 8 11 9 3 7 4 12 5 4 10 9 6 9 4

_______________

Program:

#include #include #include // std::setprecision #include using namespace std; //Declaring global variables double mean,standard_deviation; //Function declarations void calAvg(int grades[],int count); void standardDeviation(int grades[],int count); int main() { //defines an input stream for the data file ifstream dataIn; //Defines an output stream for the data file ofstream dataOut; //Declaring variables int nos,count=20; //Create an integer array which is of size based on count value int grades[count]; //Opening the input file dataIn.open("D:\\grades.txt"); if(dataIn.bad()) { cout<<"** File Not Found **"<>nos; grades[i]=nos; cout<

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!