It would look like you had started instead of it looking like someone else did your homework for you.
Once you input a string the next step is to tackle the problem of reversing it which is a couple of extra lines if you treat the string as an array of characters.