0_0_37786856_15577.cpp: In function 'int main()': 0_0_37786856_15577.cpp:12:42: error: 'M_PI' was not declared in this scope sum+=len*len*sin(ang/180.0 * M_PI)*0.5; ^