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، مع اعتبار الأحرف الكبيرة والصغيرة متساوية. حوّلها أولاً إلى أحرف صغيرة باستخدام s.toLowerCase()، ثم مرر حلقة 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. · اضغط تشغيل لرؤية المخرجات هنا.