triangle.cpp added