Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Factorial in Prolog
Tusohian
Jun 20th, 2019
375
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
⭐ GET 5OO$ GIFT CARD TO
JavaScript | 1 sec ago | 0.18 KB
⭐️ EARN $500 INSTANTLY⭐ 9J
JavaScript | 2 sec ago | 0.18 KB
⭐ get any gift card for FREE⭐ EZ
JavaScript | 3 sec ago | 0.18 KB
⭐ FREE giftcards method⭐ PT
JavaScript | 3 sec ago | 0.18 KB
⭐ FREE giftcards method JE
JavaScript | 5 sec ago | 0.18 KB
⭐ FREE giftcards method JA
JavaScript | 9 sec ago | 0.18 KB
⭐ get any gift card for FREE⭐ NQ
JavaScript | 10 sec ago | 0.18 KB
⭐️ EARN $500 INSTANTLY 4A
JavaScript | 10 sec ago | 0.18 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!