#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); inFile >> data; while (inFile) { sum += data; cout << "Adding " << data << endl; inFile >> data; } inFile.close(); cout << "The Sum is " << sum << endl; return 0; }