Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $l = 45; # Number of births per day, large
- $s = 15; # Number of births per day, small
- # Which will have more days on which >= 0.60 girls?
- $tot_s = 0;
- $tot_l = 0;
- for($i = 1; $i <= 365; $i++) {
- $l_day = 0;
- $s_day = 0;
- for($ll = 1; $ll <= $l; $ll++) {
- $l_day += randnum(0,1,1);
- }
- for($ss = 1; $ss <= $s; $ss++) {
- $s_day += randnum(0,1,1);
- }
- if ($l_day >= 27 ){
- $tot_l++;
- }
- if ($s_day >= 9 ){
- $tot_s++;
- }
- }
- '';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement