Advertisement
semsem_elazazy

https://codeforces.com/group/n3sTiYtHxI/contest/348734/problem/Q

Feb 22nd, 2022
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #include <iostream>
  2. #include<bits/stdc++.h>
  3. #define ll long long
  4. using namespace std;
  5.  
  6. int vowel(string s , int len ){
  7.     int c = 0;
  8.     for(int i=0 ; i<len ; i++){
  9.         if (s[i] == "a" || s[i] == "A" || s[i] == "e" || s[i] == "E" || s[i] == "i" || s[i] == "I" || s[i] == "o" || s[i] == "O" || s[i] == "u" || s[i] == "U")  {
  10.             c++;
  11.         }
  12.     }
  13.     return c;
  14. }
  15.  
  16. int main() {
  17.    ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
  18.  
  19. string s;
  20. getline(cin,s);
  21. int len =(int) s.size();
  22. cout<<vowel(s,len)<<"\n";
  23.  
  24.     return 0;
  25. }
  26.  
  27.  
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement