blob: c18f4e6049d5a086a8d24293a208e36c8b678f1f (
plain)
1
2
3
4
5
6
7
8
9
10
|
//Example 1.20
clc;
clear;
N=factorial(5);
disp(N,"total No. of ways in which 5 Persons can occupy seats in row =");
M=factorial(4)*2;
disp(M,"No. of favourable cases such that A and B can sit next to each other= ");
P=M/N;
disp(,P,"Probability that A and B can sit next to each other= ");
|