Third Homework

有改动，解决了死循环问题。
Forth Homework