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
Get step-by-step solutions from verified subject matter experts
