Jack welch
Jack welch

Reputation: 1707

Trying to check if a number is greater than one

I am writing a piece of prolog code and i want to find out if a number is greater than 1.It always return false whenever i query it.

sss(count):- count > 1.

Upvotes: 0

Views: 5620

Answers (1)

nullpotent
nullpotent

Reputation: 9260

Variables in Prolog begin with an uppercase letter or underscore. That being said,

sss(Count):- Count > 1.

Upvotes: 6

Related Questions