added function for reversing a string

Enter a string and it will be reversed and printed out.