summaryrefslogtreecommitdiff
path: root/1553/CH30/EX30.7/30Ex7.sce
diff options
context:
space:
mode:
Diffstat (limited to '1553/CH30/EX30.7/30Ex7.sce')
-rw-r--r--1553/CH30/EX30.7/30Ex7.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/1553/CH30/EX30.7/30Ex7.sce b/1553/CH30/EX30.7/30Ex7.sce
new file mode 100644
index 000000000..f1da7ab6c
--- /dev/null
+++ b/1553/CH30/EX30.7/30Ex7.sce
@@ -0,0 +1,14 @@
+//Chapter 30 Ex7
+clc;
+clear;
+close;
+
+S={'D','I','R','E','C','T','O','R'};
+sizeS=size(S,"c");
+n=6;
+r=2; //since R occurs twice
+noWays=factorial(n)/factorial(r);
+Vowels=3;
+noWaysVowels=factorial(Vowels); //no of ways in which vowels can be arranged
+reqWays=noWaysVowels*noWays;
+mprintf("The required number of ways are %.0f",reqWays);