Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Factorial in Prolog
Tusohian
Jun 20th, 2019
435
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
PL/I
0.21 KB
| None
|
0
0
raw
download
clone
embed
print
report
go
:-
write
(
'Enter The Number: '
)
,
read
(
N
)
,
TEMP is
1
,
fact
(
N
,
TEMP
)
.
fact
(
1
,
TEMP
)
:-
(
write
(
'Factorial is: '
)
,
write
(
TEMP
)
)
.
fact
(
N
,
TEMP
)
:-
(
RESULT is TEMP
*
N
,
B is N
-
1
,
fact
(
B
,
RESULT
)
)
.
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
Lua | 3 min ago | 37.62 KB
scan_network.bat
Batch | 5 min ago | 0.40 KB
remove_package.bat
Batch | 5 min ago | 0.40 KB
????Make 3500$ in 1 day [Method]???? XH
Java | 6 min ago | 0.15 KB
clear_cache.bat
Batch | 15 min ago | 0.40 KB
restart_daemons.cmd
Batch | 16 min ago | 0.40 KB
apply_patch.ps1
Batch | 26 min ago | 0.40 KB
sync_time.cmd
Batch | 26 min ago | 0.40 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!