using namespace std; #include <iostream> #include "randomGen.h" stdRG sR; int main (void) { double sum, tmp; sum= 0.0; for (int i= 0; i < 10000; i++) { tmp= sR.n(); sum+= tmp; if tmp < 0.4) cerr << tmp << " " << sum << endl; } return 0; }