matheus__serpa icon

Untitled

matheus__serpa | PRO | 04/08/20 10:38:59 PM UTC | 0 ⭐ | 512 👁️ | Never ⏰ | []
C |

420 B

|

None

|

0 👍

/

0 👎

#include <iostream>
#include <string>
using namespace std;
 
int main(){
    string nome{"MAthEus S. SerPA"};
    int vogais = 0;
 
    for(char c : nome)
        if(tolower(c) == 'a' || tolower(c) == 'e' || tolower(c) == 'i' || tolower(c) == 'o' || tolower(c) == 'u')
            vogais++;
 
    cout << "Vogais: " << vogais << endl;
    return 0;
}

Comments