//Paragwgh tyxaiwn arithmwn kanonikhs katanomhs me Monte-Carlo methodo. //To aoristo oloklhrwma ths f(x):Gauss den yparxei kai efarmozw monte-carlo. //Me anakateu8unsh mporeis na pareis to arxeio pou 8es twra. Ta mhnumata pane sto stderr, ta data sto stdout. #include #include #include #include using namespace std; int main(){ const int a=0,b=1000; double x,y,f,m,s; int i=0,j; cerr<<"\n"; cerr<<" PARGWGH TYXAIWN ARITHMWN KANONIKHS KATANOMHS "<<"\n"; cerr<<"\n"; cerr<<" Dwse thesh koryfhs:"<<"\n"; cin>>m; cerr<<" Dwse diaspora:"<<"\n"; cin>>s; cerr<<" Plhthos tyxaiwn arithmwn:"<<"\n"; cin>>j; cerr<<"\n"; time_t seconds; time(&seconds); srand((unsigned int) seconds); while(i=y) {cout<