%trace
domains
file = input
predicates
start
readline(integer)
comp(integer,integer)
goal
clearwindow,
start.
clauses
start:-
openread(input,"Q3I.TXT"),
write("\nEnter the no::"),
readint(No),
readdevice(input),
readline(No).
readline(No):-
not(eof(input)),
readln(Line),
str_len(Line,Len),
nl,write(Line," ",Len),
comp(No,Len),
readline(No).
comp(No,Len):-
No=Len,
write(Len).
comp(_,_).