第四章 函数和递归 1、hypot(x, y):平方和开平方 2、结构体作为函数参数 typedef struct { double x; double y; }Point; double dist(Point a, Point b) { //结构体名作为参数 return hypot(a.x-b.x, a.y-b.y); //直接使用结构体内变量 } 3、素数判定 for(int i=2; i<floor(sqrt(n)+0.5); i++) //注意判断条件:i<根号n if