Convert the string
Submissions: 967   Accuracy:

30.96%

  Difficulty: Basic   Marks: 1

Given a string S(consisting of uppercase/lowercase alphabets only), change the string s according to the rules provided below:

  • Delete all the vowels from the string.
  • Insert # in front of all the consonants.
  • Change the case of all the letters of the string.

‚ÄčNOTE: If the required string is null print "-1". 

INPUT: The first line consists of an integer T i.e. the number of test cases. First and the last line of each test case consists of an string S.

OUTPUT: Print the required string after conversion.

CONSTRAINTS:

1<=T<=100
1<=|Length of string|<=105

EXAMPLES:
INPUT :

2
aBAcAba
SunshinE

OUTPUT : 
#b#C#B
#s#N#S#H#N

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: S_A
Author: saksham0751


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.