Computer Science, asked by ujjwalusri, 1 year ago

WRITE A PROGRAM IN JAVA TO INPUT ANY STRING AND COUNT THE PAIR OF VOWELS......

NO❎SPAM❎

❕❌ BEST ANSWER REQUIRED❌

Answers

Answered by estherroyin
4
Program to input a string and display the total number of vowels present in it
Attachments:

ujjwalusri: pair of vowel
estherroyin: sorry didnt get the question
Answered by omegads03
1

There is a pre-defined sentence in this program. vow_count initializes its value to 0. The length() function will find the length of the given sentence and store it in ‘length’ variable. ‘for’ loop will continue until it traverses the whole sentence.  charAt() function will read a character in each iteration and checks that whether it is a vowel or not. If it finds a vowel then vow_count value is increased its value by one. After traversing the whole sentence, the number of vowel is found.

The following attachment is the java code for the number of vowels in a given sentence. Please find the attachment.

Attachments:
Similar questions