Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ConsoleApplication7.cpp : Defines the entry point for the console application.
- //
- #include <iostream>
- #include <string>
- using namespace std;
- void main()
- {
- char symbol;
- cout << "symbol: ";
- cin >> symbol;
- string word;
- cout << "word: ";
- cin >> word;
- int broyach = 0;
- for (int i = 0; i < word.size(); i++)
- if (word[i] == symbol) broyach++;
- cout << broyach;
- }
Add Comment
Please, Sign In to add comment