Input a phrase from the keyboard. For example, input could be: Today is a rainy day, but...

80.2K

Verified Solution

Question

Programming

Input a phrase from the keyboard. For example, input couldbe:

Today is a rainy day, but the sun is shining.

Your program should count (and output) the number of \"a\"s in thephrase, the number of \"e\"s, the number of \"i\"s , the number of\"o\"s, the number of \"u\"s, and the total number of vowels.

Note: The number of \"a\"s means the total of uppercase andlowercase \"a\"s etc.

Also: the vowels are a,e,i,o,u.

In the above example your output should be:

The phrase is \"Today is a rainy day, but the sun isshining.\"

The number of a's: 4

The number of e's: 1

The number of i's: 5

The number of o's: 1

The number of u's: 2

The total number of vowels is: 13

Code language: java

Answer & Explanation Solved by verified expert
4.0 Ratings (798 Votes)
Codeimport javautilclass Vowel public    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students