Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- using namespace std;
- int main()
- {
- ifstream inputFile;
- int sum = 0;
- int score = 0;
- inputFile.open("testas.txt");
- cout << "Reading information from the file.\n";
- while(inputFile >> score);
- {
- sum = sum + score;
- }
- cout << sum;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement