Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Factorial in Prolog
Tusohian
Jun 20th, 2019
445
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
FREE 500$ GIFTCARDS???? VF
Java | 1 sec ago | 0.14 KB
✅ Crypto Accounts
JavaScript | 13 sec ago | 0.08 KB
FREE BTC GUIDE
JavaScript | 26 sec ago | 0.08 KB
✅ MAKE $22OO IN 10 MIN 0
JavaScript | 32 sec ago | 0.07 KB
Make $1200 in 15 minutes
JavaScript | 52 sec ago | 0.08 KB
✅ Account Leaks
JavaScript | 1 min ago | 0.08 KB
GMAIL Logs (2FA disabled)
JavaScript | 1 min ago | 0.08 KB
FREE BTC GUIDE 8
JavaScript | 1 min ago | 0.07 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!