To dość łatwe wyzwanie.
Wyzwanie
Dane wejściowe będą zawierać ciąg znaków (nie nulllub pusty) o maksymalnej długości 100. Wypisz liczbę samogłosek w każdym słowie łańcucha, oddzielone spacjami.
Zasady
- Ciąg nie będzie miał więcej niż 100 znaków.
- Ciąg będzie zawierać tylko alfabetów
A-Z,a-za także może zawierać spacji. - Dane wejściowe muszą być pobierane z
stdinargumentów wiersza polecenia lub. - Dane wyjściowe muszą być wyprowadzane w
stdout. - Możesz napisać pełny program lub funkcję, która pobiera dane wejściowe
stdini generuje wynik. - Samogłoski, które Twój program / funkcja musi liczyć, to
aeiouiAEIOU.
Przypadki testowe
This is the first test case --> 1 1 1 1 1 2
one plus two equals three --> 2 1 1 3 2
aeiou AEIOU --> 5 5
psst --> 0
the quick brown fox jumped over the lazy dog --> 1 2 1 1 2 2 1 1 1
Punktacja
To jest golf golfowy , więc wygrywa najkrótsze przesłanie (w bajtach).
stdinz stdout. Nie lubię „uzyskiwać danych wejściowych” za pomocą argumentów funkcji. argumenty wiersza poleceń wydają się być w porządku. Dodałem go do postu.
The name "vowel" is often used for the symbols that represent vowel sounds in a language's writing system, particularly if the language uses an alphabet. In writing systems based on the Latin alphabet, the letters A, E, I, O, U, and sometimes Y are all used to represent vowels. However, not all of these letters represent vowels in all languages.Co rozumiesz przez samogłoski?