Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cmath>
- #include<iomanip>
- #include<algorithm>
- #include<cstdlib>
- #include<cstring>
- #include<vector>
- #define ll long long
- #define sz(x) int(x.size())
- #define all(x) x.begin(),x.end()
- using namespace std;
- void Fast_IO(){
- 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
- }
- int counter=0;
- string s;
- int count(int idx){
- if(idx == 0) return counter;
- if(s[idx] == 'a' || s[idx] == 'e' || s[idx] == 'o' || s[idx] == 'i' || s[idx] == 'u' || s[idx] == 'A' || s[idx] == 'E' || s[idx] == 'O' || s[idx] == 'I' || s[idx] == 'U') counter++;
- return count(idx-1);
- }
- void solve(){
- getline(cin,s);
- cout<<count(sz(s)-1);
- }
- int main(){
- Fast_IO();
- int t =1;
- //cin>>t;
- while(t--){
- solve();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment