Share
Explore BrainMass

Student Scores C++Application

A certain professor has a file containing a table of student grades, where the first line of the file contains the number of students and the number of scores in the table; each row of the table represents the exam scores of a given student and each column represents the scores on a given exam. The maximum possible score on each exam was 100 points. Write a program that, given the name of such a file, generates a report summarizing the overall percentage for each student and the average score on each exam.
The Program needs to be in C++ only

Solution Preview

See below and attached files. Attached S.TXT is an example input file.
=============================================
// StudentScores.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <string>
#include <vector>
#include <iostream>

#include <fstream>
#include <conio.h>

using namespace std;

static int num = 0 ; // number of students
static int num_scores = 0 ; // number of scores
static const int MAX_SCORE = 100 ;
static char file_name [256] ;

void ReadData (char* pName) ;

int _tmain(int argc, _TCHAR* ...

Solution Summary

A certain professor has a file containing a table of student grades, where the first line of the file contains the number of students and the number of scores in the table; each row of the table represents the exam scores of a given student and each column represents the scores on a given exam. The maximum possible score on each exam was 100 points.

A C++ program is written that, given the name of such a file, generates a report summarizing the overall percentage for each student and the average score on each exam.

$2.19