array question 2 & 3

got array questions 2 and 3 working sorta. They aren't returning
correctly.