Computer Science, asked by anushreemodi08, 7 months ago

Write a program to input a sentence in uppercase and find the frequency of words starting with a vowel. Also display the words. E.g. TO ERR IS HUMAN TO FORGIVE IS DIVINE Frequency of words starting with a vowel: 3 ERR IS IS

Answers

Answered by ranaashvin690
1

Sunday 9 am ko bataunga

Answered by simreensaini
6

Answer:

Given a string str with uppercase, lowercase and special characters. The input string is to end with either a space or a dot. The problem is to calculate the number of words, vowels and frequency of each character of the string in a separate line.

Example :

Input : How Good GOD Is.

Output :

Number of words = 4

Number of vowels = 5

Number of upper case characters = 6

Character = Frequency = 3

Character = . Frequency = 1

Character = D Frequency = 1

Character = G Frequency = 2

Character = H Frequency = 1

Character = I Frequency = 1

Character = O Frequency = 1

Character = d Frequency = 1

Character = o Frequency = 3

Character = s Frequency = 1

Character = w Frequency = 1

Recommended: Please try your approach on {IDE} first, before moving on to the solution.

Approach : We use a TreeMap to store characters and their frequencies. TreeMap is used to get the output in sorted order.

:

Explanation:

I HOPE YOU GET HELP FROM IT

Plz follow me nd Mark me as Brainliest

Similar questions