HW6_1(Class triangle)

change the read() as specified in the assignment