Question: **in Java and screenshots please*** Count the number of vowels & number of consonants in a word. Get a string from the user. For all

**in Java and screenshots please***

Count the number of vowels & number of consonants in a word.

Get a string from the user.

For all characters in that string, do the following :

if it is a vowel, increase the variable that keeps track of number of vowels

if it is not a vowel, increase the variable that keeps track of number of consonants.

Once you are done with checking all the characters, the following output should be printed:

Print the string.

Print the total number of vowels in a string

Print the total number of consonants in a string

Sample : pneumonoultramicroscopicsilicovolcanoconiosis

Expected Output :

Given string : pneumonoultramicroscopicsilicovolcanoconiosis

# of vowels : 20

# of consonants : 25

Sample : rhythms

Expected Output :

Given String : rhythms

# of vowels : 0

# of consonants : 7

 **in Java and screenshots please*** Count the number of vowels &

Count the number of vowels &number of consonants in a word. Get a string from the user. For all characters in that string, do the following: if it is a vowel, increase the variable that keeps track of number of vowels if it is not a vowel, increase the variable that keeps track of number of consonants. Once you are done with checking all the characters, the following output should be printed: Print the string. Print the total number of vowels in a string Print the total number of consonants in a string Sample : pne umonoultramicroscopicsilicovolcanoconiosis Expected Output Given string: pneumonoultramicroscopicsilicovolcanoconiosis # of vowels : 20 # of consonants : 25 Sample: rhythms Expected Output Given String: rhythms # of vowels : 0 # of consonants : 7

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!