Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- int n,S=0,x;
- ifstream fisierin("n_suma.in");
- fisierin>>n;
- while(fisierin>>x)
- S+=x;
- fisierin.close();
- ofstream fisierout("n_suma.out");
- fisierout<<S;
- fisierout.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment