UNKNOWN //************************************** // Name: Vowel Count Version 2.0 // Description:If you like my work please send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com. Here in the Philippines people can reach me through my mobile numbers 09993969756, 09154628025 and 09288471599. My telephone number at home is +63 (034) 4335081 and 4335675. I am also working as a freelance developer if you like to acquire my programming services kindly contact me in my email address above and mobile phone numbers. Thank you very much and Happy Programming. Regards, Mr. Jake Rodriguez Pomperada, MAED-IT Teacher, Software Developer, Web Developer and Electronics and Computer Technician Share My Code Freely Without Any Cost. Product of the Philippines. // By: Jake Rodriguez Pomperada // // // Inputs:None // // Returns:None // //Assumes:None // //Side Effects:None //This code is copyrighted and has limited warranties. //Please see http://www.Planet-Source-Code.com/xq/ASP/txtCodeId.7136/lngWId.2/qx/vb/scripts/ShowCode.htm //for details. //************************************** import java.util.Scanner; public class VowelCount { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String word = " "; int count = 0; int index = 0; System.out.print( "Enter a word or sentence: " ); word = scan.nextLine(); while (index < word.length()) { switch (word.toUpperCase().charAt(index)) { case 'A': count++; break; case 'E': count++; break; case 'I': count++; break; case 'O': count++; break; case 'U': count++; break; } index++; } System.out.println( "I have found " + count + " vowels." ); } }