Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
30
Task/Factorial/Pebble/factorial.pebble
Normal file
30
Task/Factorial/Pebble/factorial.pebble
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
;Factorial example program for x86 DOS
|
||||
;Compiles to 207 bytes com executable
|
||||
|
||||
program examples\fctrl
|
||||
|
||||
data
|
||||
|
||||
int f[1]
|
||||
int n[0]
|
||||
|
||||
begin
|
||||
|
||||
echo "Factorial"
|
||||
echo "Enter an integer: "
|
||||
|
||||
input [n]
|
||||
|
||||
label loop
|
||||
|
||||
[f] = [f] * [n]
|
||||
|
||||
-1 [n]
|
||||
|
||||
if [n] > 0 then loop
|
||||
|
||||
echo [f]
|
||||
pause
|
||||
kill
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue