Loading...
Loading...
Loading...
An old phone plan charges per character, so Ravi drops all vowels from his messages. Read a message and print it with every vowel (a e i o u, small or capital) removed. Everything else, including spaces and digits, stays as it is.
Example 1
Input
Meeting at five
Output
Mtng t fv
Example 2
Input
UPI ID: ravi@okaxis
Output
P D: rv@kxs
Capital U and I go too.
Try the problem first. Open one hint at a time.
Build the answer in a StringBuilder and append only the characters you keep.
"aeiouAEIOU".indexOf(ch) < 0 means ch is not a vowel.
Write your Java code, run it on the examples and submit it to hidden tests.
Solve in the editor