投硬幣機率模擬程序

#include <stdio.h>#include <stdlib.h>//頭像面朝上的機率 int heads(){ return rand() < RAND_MAX/2;}int main(int argc, char *argv[]){ int i, j, cnt; //N爲每次實驗投幣的次數,M爲實驗的次數 int N = atoi(argv[1]), M = atoi(argv[2
相關文章
相關標籤/搜索