Java Delete alternate characters
Submissions: 2881   Accuracy:

48.74%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

Given a string S as input. Delete the characters at odd indices of the string.

Input: First line of input contains a single integer T which denotes the number of test cases. Each line of test case follows new string S.

Output: Corresponding to each test case, print the required string.

Constraints:

1<=T<=100
1<= length(S) <=1000


Example:

Input:
2
Geeks
GeeksforGeeks

Output:
Ges
GesoGes

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

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.