Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C++ problem: I already have the Ch9_Ex2Data.txt file with the names and scores.

ID: 640648 • Letter: C

Question

C++ problem: I already have the Ch9_Ex2Data.txt file with the names and scores. I just need the code to display this from the inFile of Ch9_Ex2Data.txt. Text file:

Explanation / Answer

#include #include #include #include using namespace std; struct studentType { string studentFName[20]; string studentData[20][3]; int testscore[20][5]; char grade[20]; }; studentType s; int main() { int index; int maxindex; int maxindex1; int coldex; int coldex1; int totalscore[20]; double avscore[20]; double highscore; double highindivscore; maxindex = 0; maxindex1 = 0; coldex1 = 0; ifstream infile; infile.open("c:\unit10assignment.txt"); for(index = 0; index < 20; index++) { infile >> s.studentFName[index] >> s.testscore[index][0] >> s.testscore[index][1] >> s.testscore[index][2] >> s.testscore[index][3] >> s.testscore[index][4]; totalscore[index] = ((s.testscore[index][0]) + (s.testscore[index][1]) + (s.testscore[index][2]) + (s.testscore[index][3]) + (s.testscore[index][4])); avscore[index] = (static_cast(totalscore[index])/5); if(avscore[index]
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote