Practice
Extract Consonants
2025/May/Jun·Variant 3
MEDIUMString Processing
Given an uppercase string, output each consonant on a new line. Vowels (A, E, I, O, U) should be skipped.
Input: A single string in uppercase. Output: The consonants of the string, each on a new line.
Example:
Input: COMPUTER
Output: C
M
P
T
R
Premium is coming soon. All grading features are currently unlocked.
Sample Test Cases
Test 1: Standard word
Inputs: COMPUTER
Expected: C
M
P
T
R
Test 2: Multiple consecutive vowels
Inputs: SCIENCE
Expected: S
C
N
C
Test 3: All vowels — no output
Inputs: AEIOU
Expected:
Ctrl+Enter
Press Ctrl+Enter to run your code
or Ctrl+Shift+Enter to grade