diff options
author | Oskar <[email protected]> | 2024-08-29 15:56:24 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-08-29 15:56:24 +0200 |
commit | 5cff617b2aa2148773256eed1a00607e0189529b (patch) | |
tree | 7c291f07e5363806c3cebcec1c91237cb6f8bd53 /5p10.cpp | |
parent | 9094c8aa159ee2386fa1d2ff19cbdc73f321303b (diff) |
5.12 was a pain to figure out, its not very pretty i will admit
Diffstat (limited to '5p10.cpp')
-rw-r--r-- | 5p10.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/5p10.cpp b/5p10.cpp new file mode 100644 index 0000000..27c8a71 --- /dev/null +++ b/5p10.cpp @@ -0,0 +1,42 @@ +#include <iostream> + +/* + * + * 5.10 + * + * Same as 5.9 because i already considered capital letters + */ + +int main () { + + char Character = 0; + int Va = 0; + int Ve = 0; + int Vi = 0; + int Vo = 0; + int Vu = 0; + int NonVowel = 0; + while(std::cin >> Character) { + if(Character == 'a' || Character == 'A') { + ++Va; + } else if (Character == 'e' || Character == 'E') { + ++Ve; + } else if (Character == 'i' || Character == 'I') { + ++Vi; + } else if (Character == 'o' || Character == 'O') { + ++Vo; + } else if (Character == 'u' || Character == 'U') { + ++Vu; + } else { + ++NonVowel; + } + } + + std::cout << "A: " << Va << "\n" + << "E: " << Ve << "\n" + << "I: " << Vi << "\n" + << "O: " << Vo << "\n" + << "U: " << Vu << "\n" + << "Non Vowel: " << NonVowel << std::endl; + return 0; +} |