def reverse_string(str)
    (str.size/2).times{|x| str[x], str[-x-1] = str[-x-1], str[x]}
    puts str
end

reverse_string("adhriyaa")

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: