Factorial: Difference between revisions
m
Craft Basic moved to the BASIC section.
Basicgames (talk | contribs) |
m (Craft Basic moved to the BASIC section.) |
||
Line 1,451:
13 ! = 6.2270208E+09
</pre>
==={{header|Craft Basic}}===▼
<syntaxhighlight lang="basic">'factorial example▼
'accurate between 1-12▼
let f = 1▼
alert "factorial"▼
input "enter an integer: ", n▼
do▼
let f = f * n▼
let n = n - 1▼
loop n > 0▼
print f▼
end</syntaxhighlight>▼
==={{header|FreeBASIC}}===
Line 3,285 ⟶ 3,305:
x: 5</syntaxhighlight>
▲=={{header|Craft Basic}}==
▲<syntaxhighlight lang="basic">'factorial example
▲'accurate between 1-12
▲let f = 1
▲alert "factorial"
▲input "enter an integer: ", n
▲do
▲ let f = f * n
▲ let n = n - 1
▲loop n > 0
▲print f
▲end</syntaxhighlight>
=={{header|Crystal}}==
|