how to solve this qestion

Discussions related to Visual Prolog
Posts: 1
Joined: 5 May 2013 14:31

how to solve this qestion

Unread post by sayer » 5 May 2013 14:37

Code: Select all

/*****************************************************************************                           Copyright (c) 2013 My Company   ******************************************************************************/   implement main     open core class predicates   on:(string,string) nondeterm anyflow. blocks:(string,string) nondeterm anyflow. support:(string,string) nondeterm anyflow. item:(string) nondeterm anyflow. clauses % facts item("T"). item("A"). item("B"). item("C"). item("D"). item("E").   blocks("E","T"). blocks("D","T"). blocks("A","T"). blocks("B","A"). blocks("C","B"). clauses %rules on(X,Y):- blocks(X,Y),item(X),item(Y). clauses     run():-         console::init(),         stdIO::write("\n----------------------------item on table---------------------\n"),         on(X,Y),         stdIO::write(X," On ",Y,"\n"),fail.                   run():-                 stdIO::write("\n*******End of Program********\n").   end implement main   goal     mainExe::run(main::run).

Post Reply