Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <algorithm>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "Lithuanian");
- string sakinys;
- cout << "Įveskite sakinį: ";
- cin.getline(sakinys);
- cout << "Jūs įvedėte " << count(sakinys.begin(), sakinys.end(), ' ') << " tarpus.";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement