Reverse String Code Using Exponents