Displaying the hash using puts
Using switch construct,removed gsub to avoid another iteration,Using hash to rely proper output