Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Factorial in Prolog
Tusohian
Jun 20th, 2019
396
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
Binance account CW
JavaScript | 4 min ago | 0.05 KB
05. Xayah & Rakan | Firma
CSS | 17 min ago | 2.04 KB
Market.js
JavaScript | 17 min ago | 1.18 KB
News March31 25
Email | 18 min ago | 25.20 KB
EARN $900 INSTANTLY 2025 BT
JavaScript | 20 min ago | 0.05 KB
Untitled
JavaScript | 33 min ago | 1.18 KB
Random Gmail Acc 1A
JavaScript | 36 min ago | 0.05 KB
runWavemeter
Python | 37 min ago | 0.97 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!