Count the vowels · Đếm nguyên âm
Count the vowels
Count the vowels (a e i o u) in a String, treating upper- and lower-case the same. Lower-case it first with s.toLowerCase(), then loop with s.charAt(i) and compare against each vowel.
Đếm nguyên âm
Đếm các nguyên âm (a e i o u) trong một String, coi thường sự khác biệt về hoa/thường. Chuyển sang thường trước bằng s.toLowerCase(), sau đó lặp với s.charAt(i) và so sánh với từng nguyên âm.
Complete countVowels(String s) so it returns how many letters are vowels (a, e, i, o, u), ignoring case. · Hoàn thành countVowels(String s) để trả về số lượng ký tự là nguyên âm (a, e, i, o, u), bỏ qua chữ hoa/thường.
Click Run to see the output here. · Nhấn Chạy để xem kết quả ở đây.