题目:请说出下面图形中包含多少个三角形?请用一个程序完成计算。
C++版本
1 #include<iostream> 2 3 using namespace std; 4 5 const char NO_POINT = '0'; 6 7 //任意的一条线 8 const char *map[] = { "ad","ab","db","ae","aj","ah","ej","eh","jh","af","ak","ai","fk","fi","ki","ag","ac","gc", 9 "de","df","dg","ef","eg","fg","bj","bk","bg","jk","jg","kg","bh","bi","bc","hi","hc","ic" }; 10 //共线的点 11 const char *line[] = { "adb","aejh","afki","agc","defg","bjkg","bhic" }; 12 13 //点是否在线上 14 int contain( const char *str, char a) { 15 int i = 0; 16 while (str[i] != '