Monday, 10 February 2020

Vowels and Consonants

Vowels and Consonants

Objective 

Print each vowel in a given name (in the same order as they appeared in ). Second, print each consonant (i.e., non-vowel) in the new line (in the same order as they appeared in).



Sample Input 

‘Hello World’

Sample Output

"e"
"o"
"o"
"H"
"l"
"l"
"l"
"d"
" "
"W"
"r"


Code


Here’s my solution, with embedded comments:







I hope you found this helpful.
Cheers :)



No comments:

Post a Comment

Diagonal Difference

Diagonal Difference Objective Given a square matrix, calculate the absolute difference between the sums of its diagonals. Descripti...