#include #include #include using namespace std; int main() { /* declare an ifstream named "inputfile" */ /* use ifstream to open "grades.txt" */ string header; string first; string last; int id; int grade1; int grade2; int grade3; // read the first line because we don't need it // we can't avoid reading it because we have to read // the file from top to bottom // read in the first line of the file using the getline() function while(inputfile >> first >> last >> id >> grade1 >> grade2 >> grade3) { /* calculate the average grade of the student and print the students name and average grade to the screen */ } inputfile.close(); return 0; }