Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main() {
- ifstream file_in;
- file_in.open("in.txt", ios::in);
- char a;
- int counter = 0;
- while (!file_in.eof()) {
- file_in >> a;
- if (a != ' ') {
- counter++;
- }
- }
- cout << counter;
- file_in.close();
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement