monte carlo simulation program c