2012-10-29から1日間の記事一覧

サイコロ #7

C

次に、#2のルールにしたがって、同じく一億回試行してみる。 一億回は試行回数であって、ダイスを振る回数はそれ以上になる。 dice2.c #include <stdio.h> #include <math.h> #include "dSFMT.h" #define MPT 5 /* max point per a throw */ #define M (MPT * 2 + 1) /* size </math.h></stdio.h>…