//加上头文件 #include<math.h> //格式 if() {} else if() {} else if() {} else {}
else if的else去掉试试,要用函数sqrt要加上头文件<math.h>