Advertisement
matheus__serpa

Untitled

Apr 8th, 2020
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main(){
  6.     string nome{"MAthEus S. SerPA"};
  7.     int vogais = 0;
  8.  
  9.     for(char c : nome)
  10.         if(tolower(c) == 'a' || tolower(c) == 'e' || tolower(c) == 'i' || tolower(c) == 'o' || tolower(c) == 'u')
  11.             vogais++;
  12.  
  13.     cout << "Vogais: " << vogais << endl;
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement