Getch was not declared in this scope lỗi năm 2024
include
include
includedouble uniRand(){return rand()/(double)RAND_MAX;} int main(void) { int NTrial=100000; double Sum=0; double I,y; for(int i=0;i<=NTrial;i++) { y=pow(uniRand()+uniRand()+uniRand()+uniRand()+uniR and()+uniRand()+uniRand()+uniRand(),2); Sum=Sum+y; } I=(double)Sum/NTrial; printf("tich phan%lf ",I); return 0; system("pause"); } -
mọi người xem hộ em với. em cũng bị mắc lỗi ko chạy được chương trình trên DeV C++. ko có lỗi nhưng khi chạy nó chỉ nháy 1 cái. em cũng dùng lệnh system("pause"); nhưng ko được. chương trình tính tích phân bằng Monte carlo Mã: include
include
include |