#include #include #include using namespace std; int main() { string fileName; ifstream inFile; int sum{0}, data{0}; cout << "Enter the file name " ; cin >> fileName; inFile.open(fileName); while (not inFile.eof() ) { inFile >> data; cout << "adding in " << data << endl; sum += data; } inFile.close(); cout << "The Sum is " << sum << endl; return 0; }