Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<bits/stdc++.h>
- #define ll long long
- #define ull unsigned long long
- #define pi 3.14159
- //#define ceil(w, m) (((w) / (m)) + ((w) % (m) ? 1 : 0))
- using namespace std;
- void yasmeen_fakhri(){
- ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
- #endif
- }
- bool is_vowel(char ch){
- return (ch == 'a' || ch == 'o' || ch == 'e' || ch == 'i' || ch == 'u' || ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U') ;
- }
- //ll c=0 ;
- ll count_vowels(string s , ll len ){
- //if(len < 0) return;
- if (len < 0)
- return 0;
- return count_vowels(s, len-1) + is_vowel(s[len]);
- }
- int main() {
- yasmeen_fakhri();
- int test =1;
- //cin>>test;
- while(test--){
- string s;
- cin.ignore();
- getline (cin ,s);
- ll len =s.size();
- //count_vowels(s,len-1);
- cout<<count_vowels(s,len-1) ;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement