blob: 24a09dd2d5b49642496a3ff9422a0be43d34696b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
clc
clear
//INPUT
p1=4/52;//the probability for getting ace in first draw is
p2=3/51;//the probability for getting ace in second draw is
p3=2/50;//the probability for getting ace in third draw is
p4=1/49;//the probability for getting ace in fourth draw is
//CALCULATIONS
p=p1*p2*p3*p4;//total probability is
//OUTPUT
mprintf('total probability is %3.7f',p)
|