summaryrefslogtreecommitdiff
path: root/3808/CH2/EX2.1/Ex2_1.sce
blob: 97e401b71b635a3d3a34fb8b8aecd3b0ae3f516c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//Chapter 02:Basic Structures: Sets, Functions, Sequences, Sums and Matrices

clc;
clear;

mprintf("The factorial of 1 is")
disp(factorial(1))
mprintf("The factorial of 2 is")
disp(factorial(2))
mprintf("The factorial of 6 is")
disp(factorial(6))
mprintf("The factorial of 20 is")
disp(factorial(20))

disp("It shows that the factorial function grows extremely rapidly as the number grows.")