Question: Write a Java program that gets a noun from the keyboard as a String and if the noun starts with a vowel, the program prints

Write a Java program that gets a noun from the keyboard as a String and if the noun starts with a vowel, the program prints "an" followed by the noun, otherwise it prints "a" followed by the noun. For example, if the input noun is "apple" the program prints "an apple" and if the noun is "cat" the program prints "a cat". You may assume all letters are lower case and the vowels are a, e, i, o, u.

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!