Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- int n,i,nr;
- char c[256];
- int main()
- {
- cin.getline(c,256);
- n=strlen(c);
- for (i=1;i<n-1;i++)
- {
- ///daca c este vocala
- if (strchr("aieou",c[i]))
- {
- ///verificam daca elementele de langa c[i] nu sunt vocale
- if (!strchr("aieou",c[i-1]) && !strchr("aieou",c[i+1]))
- {
- ///verificam daca sunt litere
- if (strchr("qwertyuiopasdfghjklzxcvbnm",c[i-1]) && strchr("qwertyuiopasdfghjklzxcvbnm",c[i+1]))
- {
- nr++;
- }
- }
- }
- }
- cout<<nr;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement