#include<math.h> 加上scanf 语句没有地址符 &,并且 %d 中间要有空格a 的平方应该写成 a * a ,b也是,还有后面的 2 * a * b * costc 应该为浮动型,输出用 %.2f