blob: 29054baae4dbc1ddff2078332e5f042b1b96bfff (
plain)
1
2
3
4
5
6
7
8
9
10
|
//Chapter 30 Ex4
clc;
clear;
close;
S={'B','I','H','A','R'};
sizeS=size(S,"c");
reqLetters=sizeS; //since all the letters are required
noWords=factorial(sizeS)/factorial(sizeS-reqLetters);
mprintf("The required number of words are %.0f",noWords);
|