Count the vowels · นับสระ
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.
นับสระ
นับสระ (a e i o u) ใน String, treating upper- และ lower-case เหมือนกัน Lower-case ก่อนด้วย s.toLowerCase(), จากนั้น loop ด้วย s.charAt(i) และเปรียบเทียบกับสระแต่ละตัว
Complete countVowels(String s) so it returns how many letters are vowels (a, e, i, o, u), ignoring case. · เติม countVowels(String s) ให้มันนับว่ามีตัวอักษรเป็นสระ (a, e, i, o, u) กี่ตัว โดยไม่สนใจตัวพิมพ์เล็ก/ใหญ่
Click Run to see the output here. · คลิก Run เพื่อดูผลลัพธ์ที่นี่