adding in question numebr 5 answers
adding in question numebr 5 method and answer output