You are on page 1of 1

domains

predicates
go check(char,string)
clauses
go:-
write("Enter the string:"),
readchar(S),
check(S,X):-
write("\n",S," is",X).
check(S,X):-
S>=65,S<=90,
X=" ALphabet\n".
check(S,X):-
S>=97,S<=122,
X=" Alphabet.".
check(S,X):-
S>=48,S<=57,
X=" Digit.".

You might also like