Advertisement
Josif_tepe

Untitled

Jan 27th, 2025
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. #include <ctype.h>
  4. using namespace std;
  5.  
  6. int main() {
  7.     char s[1000];
  8.     cin >> s;
  9.    
  10.     int result = 0;
  11.     for(int i = 0; i < strlen(s) - 1; i++) a{
  12.         if(s[i] == 'a' && s[i + 1] == 'E') {
  13.             result++;
  14.         }
  15.         if(s[i] == 'o' && s[i + 1] == 'Y') {
  16.             result++;
  17.         }
  18.         if(s[i] == 'Q' && s[i + 1] == 'w') {
  19.             result++;
  20.         }
  21.     }
  22.     cout << result << endl;
  23.     return 0;
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement