langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
10
Task/Factorial/Sisal/factorial-1.sisal
Normal file
10
Task/Factorial/Sisal/factorial-1.sisal
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
define main
|
||||
|
||||
function main(x : integer returns integer)
|
||||
|
||||
for a in 1, x
|
||||
returns
|
||||
value of product a
|
||||
end for
|
||||
|
||||
end function
|
||||
11
Task/Factorial/Sisal/factorial-2.sisal
Normal file
11
Task/Factorial/Sisal/factorial-2.sisal
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
define main
|
||||
|
||||
function main(x : integer returns integer)
|
||||
|
||||
if x = 0 then
|
||||
1
|
||||
else
|
||||
x * main(x - 1)
|
||||
end if
|
||||
|
||||
end function
|
||||
Loading…
Add table
Add a link
Reference in a new issue