WAP
to perform Down counting.
predicates
downcount(integer)
go
clauses
go:-write("Enter
the number"),
readint(X),
downcount(X).
downcount(0).
downcount(X)
if X>0,
write("\n",X),
X1=X-1,
downcount(X1).
Output:-
Goal:
downcount(10)
10
9
8
7
6
5
4
3
2
1 Yes