Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int e = 0;
- int probel = 0;
- char a[100];
- cout << "vvedi chto nibud";
- cout << endl;
- cin.getline(a, 100);
- while ( e < 100 )
- {
- if ( a[e] == 32 )
- {
- probel++;
- }
- e++;
- }
- probel++;
- cout << probel << " words";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement