diff options
Diffstat (limited to '3808/CH6/EX6.9/Ex6_9.sce')
-rw-r--r-- | 3808/CH6/EX6.9/Ex6_9.sce | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/3808/CH6/EX6.9/Ex6_9.sce b/3808/CH6/EX6.9/Ex6_9.sce new file mode 100644 index 000000000..7ebf8aec9 --- /dev/null +++ b/3808/CH6/EX6.9/Ex6_9.sce @@ -0,0 +1,17 @@ +//Chapter 06: Counting + +clc; +clear; + +function res=citycal(n) //function definition +i=n +res=1 +for i=1:n-1 +res=res*i +end +return res +endfunction + +num=input("Enter the number of cities:") +result=citycal(num) +mprintf("The number of possible ways to decide the path is %d ",result) |