12 rinclude 13 rinclude 16 include 17 18 using namespace std e z1 21 // function
ID: 3597324 • Letter: 1
Question
12 rinclude 13 rinclude 16 include 17 18 using namespace std e z1 21 // function declarations: 22 11 23 int Inputoata(string filenane, int exan1[), int exan2[1, int exam3[1 24 void Sort (int Atl, int N): 2s double ComputeAvg(int A[1, int N); 26 double ComputeHedian(int All, int N): 27 double StandardDev(int Al], int N); 28 void Histogran(int Atl, int N, int histogramll) 29 3e 32 1 main: 33 11 34 int main() 35 36 int exam[1000]; 37 int exam2[18e01; 8int exa3[1ee01; 9 intN 4e string filename 41 42 43 input filenane from keyboard: 4a11 45 cin > filenane; 46 47 I 48 Input data and perform analysis: 49 11 se coutExan Analysisendl; 51 cout -Filename : -Explanation / Answer
int main()
{
int grade1[1000];
int grade2[1000];
int grade3[1000];
int N;
string filename;
cin>>filename;
cout<<" Grade analysis"<<endl;
cout<<"Filename: "<<filename<<endl;
N=InputData(filename,grade1,grade2,grade3);
cout<<" Number of students: "<<N<<endl;
cout<<" Average of grade1: "<< ComputeAvg(grade1,N)<<endl;
cout<<" Average of grade2: "<< ComputeAvg(grade2,N)<<endl;
cout<<" Average of grade3: "<< ComputeAvg(grade3,N)<<endl;
Sort(grade1,N);
Sort(grade2,N);
Sort(grade3,N);
cout<<"Median of exam1: "<<ComputeMedian(grade1,N)<<endl;
cout<<"Median of exam2: <ComputeMedian(grade2, N)<<endl;
cout<<"Median of exam3 "<<ComputeMedian(grade3,N)<<endl;
cout<<"Standard Deviation of grade1: "<<StandardDev(grade1,N)<<endl;
cout<<"Standard Deviation of grade2"<<StandardDev(grade2,N)<<endl;
cout<<"Standard Deviation of grade3"<<standardDev(grade3,N)<<endl;
cout<<"Histograms A B C D E"<<endl;
Histogram(grade1,N,histogram);
Histogram(grade2,N,histogram
Histogram(grade3,N,histogram);
cout<<"** done **;
return 0;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.