#include <iostream>
#include <fstream>
using namespace std;
int main(){
int x, sum=0;
ifstream f("numbers.txt");
while(!f.eof()){
f >> x;
sum +=x;
}
cout << "Sum : " << sum;
}
This is a C++ program.
Next time be more precise on the programming language you want