my codes
soldier_of(s1,b5,100).
soldier_of(s2,b5,90).
soldier_of(s3,b5,80).
prolog command line
?-solder_of(X,b5,_).
X = s1 ;
X = s2 ;
X = s3 ;
just i want count the above result as = 3 (the answer should be = there are 3 soldiers in the base station No. 5)
please be kind enough to solve...
///// b5 refers to base station No. 5
///// s1, s2, s3 refers to the soldiers connected to the base station No. 5
soldier_of(s1,b5,100).
soldier_of(s2,b5,90).
soldier_of(s3,b5,80).
ignore the connected distance in numbers
i typed solder_of(X,b5,_). in prolog command line and i got the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.