2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
14
Task/Factorial/Simula/factorial.simula
Normal file
14
Task/Factorial/Simula/factorial.simula
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
begin
|
||||
integer procedure factorial( n );
|
||||
integer n;
|
||||
begin
|
||||
integer fact, i;
|
||||
fact := 1;
|
||||
if n > 1 then
|
||||
for i := 2 step 1 until n do
|
||||
fact := fact * i;
|
||||
factorial := fact
|
||||
end;
|
||||
outint( factorial( 6 ), 5);
|
||||
outimage
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue