#include <string>
#include <iostream>
Go to the source code of this file.
◆ main()
Definition at line 5 of file 1.cpp.
5 {
6 string input;
7 getline(cin, input);
8 cout << input.length() << endl;
9
10 string input_substr = input.substr(input.rfind(' ') + 1, input.length() - input.rfind(' ') - 1);
11 cout << input_substr << endl;
12
13 int a = 0;
int e = 0;
int i = 0;
int o = 0;
int u = 0;
14 for (long long unsigned int index = 0; index<input_substr.length(); index++) {
15 switch (tolower(input_substr[index])) {
16 case 'a':
18 break;
19 case 'e':
20 e++;
21 break;
22 case 'i':
23 i++;
24 break;
25 case 'o':
26 o++;
27 break;
28 case 'u':
29 u++;
30 break;
31 }
32 }
33 cout <<
"a: " <<
a << endl;
34 cout << "e: " << e << endl;
35 cout << "i: " << i << endl;
36 cout << "o: " << o << endl;
37 cout << "u: " << u << endl;
38 return 0;
39}