add triangle.cpp