update triangles.c

minor changes