PROLOG Program to Find Area of Circle
constants
text="Radius of circle is="
pi=3.14159
double=2
predicates
output(integer, real)
clauses
output(0, _),
output(N, R) if N>0,
C=2*pi*R,
A=pi*R*R,
write(text, R, "Circumference=", C, "Area=", A),
n1,
R1=double*R,
N1=N-1,
output(N1, R1)