#include <iostream>
#include <cmath>
using namespace std;
double monte_carlo(){return M_PI}
int main()
{
cout << "piの値は" << monte_carlo();
return 0;
}

モンテカルロ法ならこっちのほうが簡潔だぜ