Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int povtoreniya[100];
- char stroka[100];
- int d = 0;
- cout << "vvedi stroku:";
- cin.getline(stroka, 100);
- for (int i = 0; i < 100; i++) {
- povtoreniya[i] = 0;
- }
- for (int i = 0; i < strlen(stroka); i++) {
- if (stroka[0] == stroka[i])
- povtoreniya[0]++;
- }
- cout << "bukva " << stroka[0] << " povtoryaetsya " << povtoreniya[0] << " raz";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement