-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path12codcad.cpp
More file actions
38 lines (31 loc) · 738 Bytes
/
Copy path12codcad.cpp
File metadata and controls
38 lines (31 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <iostream>
using namespace std;
int main(){
string nome;
int a=0, e=0, i=0, o=0, u=0;
getline(cin, nome);
for(int j= 0; j < nome.size(); j++){
if (nome[j] == 'a'){
a++;
}
if (nome[j] == 'e'){
e++;
}
if (nome[j] == 'i'){
i++;
}
if (nome[j] == 'o'){
o++;
}
if (nome[j] == 'u'){
u++;
}
}
cout << "a = " << a << "\n";
cout << "e = " << e << "\n";
cout << "i = " << i << "\n";
cout << "o = " << o << "\n";
cout << "u = " << u << "\n";
// variavel.sizeof() [le o tamanho da variavel]
// getline(cin, variavel) [le a linha inteira]
}