#include <iostream>
#include <fstream>
using namespace std;

struct Grades
{
  char last[15];
  char first[15];
  int hw;
  int lab;
  //... other grades here. Also, grades could be double
};

int main()
{
  Grades studentGrades[10];
  ifstream infile ("grades.dat", ios::in);

  for (int i = 0; i < 2; i++)
    {
      infile >> studentGrades[i].last;
      infile >> studentGrades[i].first;
      infile >> studentGrades[i].hw;
      infile >> studentGrades[i].lab;

      int score=studentGrades[i].hw+studentGrades[i].lab;
      
      cout << "Final score for " << studentGrades[i].last << studentGrades[i].first << ": " << score << endl;
    }
}

