//--------------------------------------------------------------------
// sumscore.cpp 
//--------------------------------------------------------------------

#include <iostream.h> #include <fstream.h>
void main () { int score, sum = 0;
ifstream inFile("scores.dat");
while ( inFile >> score ) sum += score;
inFile.close();
cout << "The sum is " << sum <<endl; }