summaryrefslogtreecommitdiff
path: root/55/CH6/EX6.6/6ex6.sci
blob: da51f7448ccb48b8c6cc04813c9bcea24f404404 (plain)
1
2
3
4
5
6
7
8
9
function [k]= funct1(n,p,q)
k= factorial(n)/(factorial(p)*factorial(q));
endfunction
k=funct1(7,3,2)  //in "BENZENE" three letters are alike(the three Es) and two are alike (the two Ns)
disp(k,'The number of seven-letter words that can be formed using letters of the word BENZENE')

disp('a set of 4 indistinguishable red coloured flags, 3 indistinguishable white flags and a blue flag is given')
j=funct1(8,4,3); 
disp(j,'number of different signals ,each consisting of eight flags')