/************************************************************
CHEESE.C - a program to invoke the
cheese knowledge base
************************************************************/
#include <stdio.h>
#include "pcxpro.h"
main()
{
int cf; /* confidence factor for result */
char value[80]; /* contains the return string value
from the consultation */
if(load_knowledge_base("cheese.kb"))
/* if success in loading */
solve_for("CHEESE",
/* the goal for this consultation */
'B', /* inference method, backward for this ex. */
value, /* string for the returned result */
&cf); /* confidence factor for result */
printf("The cheese recommended for this consultation
is %s\n", value);
}