Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- #include <stdio.h>
- using namespace std;
- int main()
- {
- int k;
- char s[256];
- cin >> k;
- getchar();
- gets(s);
- char sep[] = " .,";
- char *p = strtok(s, sep);
- while (p)
- {
- int n = strlen(p), nr = 0;
- for (int i = 0; i < n; i++)
- if (strchr("aeiouAEIOU", p[i]))
- nr++;
- if (k == nr)
- cout << p << endl;
- p = strtok(NULL, sep);
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment