x.X Solution x.x.lor=\"red\">please rate - thanks //A text file contains ids and
ID: 3619279 • Letter: X
Question
x.XExplanation / Answer
x.x.lor="red">please rate - thanks //A text file contains ids and test scores for 15 students in a class. // Each line in the file contains an ID followed by 10 scores. // name of the text file is TenTests.txt #include #include #include #include using namespace std; const int NUMBER_OF_STUDENTS = 15; const int NUMBER_OF_SCORES = 10; int findlargest(int [][NUMBER_OF_SCORES +1],int); void changeGrades(int [][NUMBER_OF_SCORES +1],int); double findAverage(int [][NUMBER_OF_SCORES +1],int,int); int findID(int [][NUMBER_OF_SCORES +1],int,int r=NUMBER_OF_STUDENTS ); void printMatrix(int matrix[][NUMBER_OF_SCORES +1], int NUMBER_OF_ROWS); void getData (ifstream& infile, int matrix[][NUMBER_OF_SCORES + 1 ], int noOfRows) ; int main() { int scores [NUMBER_OF_STUDENTS][NUMBER_OF_SCORES +1 ] ; // column 0 will hold the student ID. // row n has the ID and scores for student n. int exam,i,id,row; double average; char yesorno='y'; ifstream inData; //input file stream variable inData.open("TenTests.txt"); if ( !inData) { coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.