blob: 03c265496f568d4ea67c4589299990e8404f38f1 (
plain)
1
2
3
4
5
6
|
c1=3; //number of toys that the youngest child should get
c2=2; //number of toys that the third child should get
c3=2; //number of toys that the second child should get
c4=2; //number of toys that the eldest son should get
m=factorial(9)/(factorial(3)*factorial(2)*factorial(2)*factorial(2));
disp(m,'number of ways nine toys can be divided between four children with the youngest son getting 3 toys and others getting 2 each')
|