Change Layout
9. String Middle Element Modification
Question:Given a string S, print it after changing the middle element to * (if the length of the string is even, change the 2 middle elements to *).
Sample Input:hello
Sample Output:he*lo
Code Editor
s
*
sadsad
sa**ad
Are you sure you want to reset?
Your code will be replaced with the default code. Unsaved changes will be lost.
Keep the Code Changes?
Settings
For better Experience, Practice CodeKata through desktop devices.
Share Problem
You can share this problem with your family and friends on Social Media.
Share in:
Feedback
Problem
String Middle Element Modification
Issues Encountered*
Additional Feedback
+0 Geekoins
Congratulations! You have earned 0 Geekoins on solving this problem
Testing
0%
All Problems