blob: 538e1192607bd760cae6732ff10b41a6d875be1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
//Chapter 02:Basic Structures: Sets, Functions, Sequences, Sums and Matrices
clc;
clear;
n=1
result=0
number=input("Enter the number:");
for i=1:number-1
n=n+(i*n)
end
mprintf("The factorial of %d is %d",number,n)
|