简介
使用math库给我们定一个一些常用常量
参考链接
https://www.quantstart.com/articles/Mathematical-Constants-in-C/
code
#define _USE_MATH_DEFINES
#include <cmath>
#include <iostream>
int main() {
std::cout << M_PI << " " << M_E << " " << M_SQRT2 << endl;
return 0;
}