diff options
Diffstat (limited to '1553/CH30/EX30.5/30Ex5.sce')
-rw-r--r-- | 1553/CH30/EX30.5/30Ex5.sce | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/1553/CH30/EX30.5/30Ex5.sce b/1553/CH30/EX30.5/30Ex5.sce new file mode 100644 index 000000000..7a2ff7323 --- /dev/null +++ b/1553/CH30/EX30.5/30Ex5.sce @@ -0,0 +1,14 @@ +//Chapter 30 Ex5
+clc;
+clear;
+close;
+
+S={'D','A','U','G','H','T','E','R'};
+sizeS=size(S,"c");
+n=6; //since there are 3 vowels, they are considered as 1 letter
+reqLetters=n; //since all the letters are required
+noLetters=factorial(n)/factorial(n-reqLetters);
+reqVowels=3; //since vowels are required to be together
+noWays=factorial(reqVowels); //no of ways in which vowels can be arranged together
+mprintf("The required number of words are %.0f",noLetters*noWays);
+
|