Question: Write a program which takes a String input and then prints the number of times the letter p is followed by a vowel (y is

Write a program which takes a String input and then prints the number of times the letter p is followed by a vowel (y is not considered a vowel here). The letter p, and the vowel that follows, may be upper or lower case.

Hint - remember there are String methods which return a copy of the String it is called on with all letter characters changed to the same case.

in java

Sample run

Input String: Peter Piper picked a pack of pickle peppers. Contains p followed by a vowel 8 times.

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!