Mocking SpongeBob
Bring back memories? In 2017, a meme format went viral that lOoKed lIKe tHIs.
Your task is to create a C program that converts an input string to this meme format, using the following format rules.
Format rules:
- The first vowel and second consonant of each word is converted into uppercase.
- All other letters remain lowercase.
💡
Hint: The string.h
library contains a function that'll help you iterate
over each word.
Input Format
A string that can contain characters, numbers or Unicode characters.
Constraints
Output Format
The same string S, formatted in accordance to the rules.
Examples
Input | Output | Explanation |
---|---|---|
revision | rEVision | E is the first vowel. V is the second consonant. |
tuesday 12 april 2022 | tUeSday 12 ApRil 2022 | The first vowel and second consonant of each word are capitalised. Numbers remain the same. |
nike air force 1 $160.00, 20% discount! | nIKe Air fORce 1 $160.00, 20% dIScount! | Same as above. Unicode symbols aren't modified. |