Update project2.c

there are many printf in my code just used to help me debug and now I //them and I also change some fatal mistakes in my code. By now, I think I got the correct cost. However, there is still a confusion for me and I mail you about this confusion.