Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- string chuj;
- int count[26] = {0};
- int numb = 0;
- int i;
- cin >> chuj;
- for (i = 0;i < chuj.length();i++)
- {
- if (chuj[i]==chuj[i+1])
- {
- count[i]++;
- }
- }
- for (i = 0;i < 26;i++)
- {
- if (count[i] != 0)
- {
- numb++;
- }
- }
- cout<<"The ammount of repeating letters is\t" << numb << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement