Chat with our AI personalities
max = a > b ? a : b; max = max > c ? max : c;
int max = a>b?a:b; // set max to the larger of a and b
Assuming probability of having a boy is P(B) = 1/2, and of having a girl is P(G) = 1/2,the probability of having 3 boys for 4 kids (with out regard to the girl to be the first,second, third or fourth kid) is;P(3B1G) = 4C3 [P(B)]4 = 4 (1/2)4 = 0.250 = 25%The factor 4 comes because there are 4 possibilities for the order in which the girl cancome out.
b + 4 = 7.7 b = 7.7 - 4 b = 3.7
3b+4 = b+12 3b-b = 12-4 2b = 8 b = 4