Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
15
Task/Factorial/Simula/factorial.simula
Normal file
15
Task/Factorial/Simula/factorial.simula
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
begin
|
||||
integer procedure factorial(n);
|
||||
integer n;
|
||||
begin
|
||||
integer fact, i;
|
||||
fact := 1;
|
||||
for i := 2 step 1 until n do
|
||||
fact := fact * i;
|
||||
factorial := fact
|
||||
end;
|
||||
integer f; outtext("factorials:"); outimage;
|
||||
for f := 0, 1, 2, 6, 9 do begin
|
||||
outint(f, 2); outint(factorial(f), 8); outimage
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue