[C] Triangle project Chapter 5