Question: a) Input a String from the user (use Scanner class method nextLine). Convert the String to lowercase. b) Write a for loop that counts how

 a) Input a String from the user (use Scanner class method

a) Input a String from the user (use Scanner class method nextLine). Convert the String to lowercase. b) Write a for loop that counts how many of each lowercase vowel (a, e, i, o, u) are found in the String. Note: You will need 5 integer variables to store the counts and these variables must be initialized to 0. c) After the loop is over, display the number of times each vowel was found. d) Once you have the for loop working, do the problem again using a while loop. Do not declare new variables. Reset the counts to o before you start the while loop

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!