Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- string vowels = "AEIOUYaeiouy";
- int n, vowelNumbers = 0, symbolNumbers = 0;
- cin >> n;
- char chr;
- for (size_t i = 0; i < n; i++) {
- cin >> chr;
- if (isalpha(chr)) {
- if (vowels.find(chr) != -1) {
- vowelNumbers++;
- }
- else {
- symbolNumbers++;
- }
- }
- }
- cout << vowelNumbers << ' ' << symbolNumbers << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement