#C8665. Remove Vowels from a String
Remove Vowels from a String
Remove Vowels from a String
Your task is simple: given an input, remove all vowels from the string. Vowels are defined as \(a, e, i, o, u\) in both lowercase and uppercase (i.e., \(A, E, I, O, U\)).
The program must read input from stdin and print the result to stdout. The input will consist of two lines. The first line specifies the type of the input. If the type is exactly string
, then the second line of the input will contain the string from which vowels must be removed. If the type is not string
, your program should output Invalid input!
instead.
For example:
- If the input is:
string This is a test.
Ths s tst.
inputFormat
The input consists of two lines:
- The first line contains a keyword representing the type of the input. It must be
string
for the input to be valid. - If the first line is
string
, the second line contains the actual string from which vowels will be removed.
outputFormat
If the input type is string
, output the string with all vowels (\(a, e, i, o, u\) in both cases) removed. Otherwise, output Invalid input!
.
string
This is a test.
Ths s tst.