Fixed triangle.c bug and added new test cases(which have a bug)