FactorialByValue.m is been added

This commit is contained in:
programarivm 2019-09-25 19:55:27 +01:00
parent f49e03b71d
commit dad10a78c2
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
write "Enter n: "
read n,!
set result=$$factorial(n)
write n,"! = ",result,!
halt
factorial(n)
if n=1 quit 1
set k=1
for i=1:1:n do
. set k=k*i
quit k