Thank you for your kindness many times.
Paste the source code below.
#include <iostream>
#define N 1000
using namespace std;
int kadai211(void) {
double cnt = 0.0;
for (int i = 0; i < N; i++) {
double x = (double)rand() / RAND_MAX;
double y = (double)rand() / RAND_MAX;
if ((x * x + y * y) <= 1) {
cnt += 1.0;
}
}
cout << "pi:" << cnt / N * 4.0 << endl;
return 0;
}