Question: Write a program that reads in lines from the input. After each line is read in, it prints out the number of capital vowels, the

Write a program that reads in lines from the input.

After each line is read in, it prints out the number of capital vowels, the number of capital consonants, and the number of other characters in the line. Input The input is just any line of characters

Output:

The output will be the number of CAPITAL vowels (aeiou), the number of CAPITAL consonants (i.e. not vowels), and the number of other characters in the line. These are separated by a single space between them.

Sample Input:

aokEKOkM49!4kP

AAAAOOPPPELL994920;[;];,<.>[

dv

Sample Output:

2 3 9

7 5 16

0 0 2

HINT:

Loop over the String a character at a time (using charAt(i) to get the character at index i). Check if the character is a CAPITAL vowel (i.e. 'A' or 'E' or 'I' or 'O' or 'U'). ELSE check if is between 'A' and 'Z' -using >= and

I have my code however it is not working, what do I need to change?

Write a program that reads in lines from the input. After each

eclipse-workspace-CountUpperCase/src/CountUpperCase.java-Eclipse IDE File Edit Source Refactor Navigate Search Project Run Window Help Quick Access] .| 1 CountupperCase java ManyNumbers.java RealEquity java import java.util.Scanner; 4 public class CountupperCase 6 public static void moin(Stringl] args) Scanner scan new Scanner (System.in); while (scan.haslext ))( int capitalVowelcount e, capitalconsonentcount- e, othersCount -0; String line scan.next) 12 for(int i-0; i

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!