counting with Jess

Go To


I'm so new to JESS, I have defined many facts about students

(deffacts myStudents
(student (Name Ruba) (AVG 81))
(student (Name Lolo) (AVG 80))
(student (Name Koko) (AVG 75))
(student (Name Soso) (AVG 85))
(student (Name dodo) (AVG 64))
(student (Name popo) (AVG 25))
(student (Name qoqo) (AVG 91))
(student (Name wowo) (AVG 60))
(student (Name eoeo) (AVG 13)))

and I need to count the successful students and failed students(if the AVG >=60 then he is successful )
But I can't make a variable to keep his value through counting
Please any help ?

2012-04-04 20:09
by Ruba


You can achieve that with the accumulate CE.

2012-04-04 21:21
by Rhangaun