CodeKata

CodeKata LeaderboardLeaderboard

9. String Middle Element Modification

Geekoin20
Easy

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

Accepted 12k
Submissions 14k
Acceptance Rate 82.31%
Topics
arraystrings

Code Editor

You need to   or  to run or submit the code