Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- int i = 0, count = 0;
- string s;
- getline(cin, s);
- while (s[i] != '\0')
- {
- if (s[i] == 'K' || s[i] == 'c') count++;
- i++;
- }
- cout << count << endl;
- }
Add Comment
Please, Sign In to add comment