Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- #include <string>
- #include <algorithm>
- int main ()
- {
- cout << "Insira a palavra" << endl;
- std::string content;
- std::string line;
- getline(cin,line);
- std::string text = line;
- content += line;
- std::cout << "Numero de vezes e = " << std::count(text.begin(), text.end(), line);
- cin.get();
- return 0;
- }
Add Comment
Please, Sign In to add comment