summaryrefslogtreecommitdiff
path: root/1553/CH31/EX31.3/31Ex3.sce
blob: ff35de1b14424a79b2b846a5a7a840ad45ea3fc0 (plain)
1
2
3
4
5
6
7
8
9
10
//chapter 31 Ex 3

clc;
clear;
close;
S={'1','2','3','4','5','6'};
E={'3','6'};
sizeS=size(S,"c"); sizeE=size(E,"c");
prob=sizeE/sizeS;
printf("The probability of getting multiple of 3 is %0.2f",prob);