crislanio_macedo Posted June 9, 2015 at 02:39 AM Report #584540 Posted June 9, 2015 at 02:39 AM Olá não tenho nenhuma experiência em prolog, e sei que este forum é de perl, contudo acredito que alguém aqui possa me ajudar. tenho o seguinte código em prolog, e está dando erro. aresta (a,b). aresta (a,c). aresta (b,d). aresta (d,c). adjacente (N, F) :- aresta (N, F). adjacente (N, F) :- aresta (F, N). está dando o seguinte erro, ?- ['Grafo.pl']. ERROR: /home/crislanio/Área de Trabalho/Grafo.pl:1:7: Syntax error: Operator expected true. Att,
Solution crislanio_macedo Posted June 9, 2015 at 02:56 AM Author Solution Report #584541 Posted June 9, 2015 at 02:56 AM aresta(a,b). aresta(b,f). aresta(b,c). aresta(c,d). aresta(d,g). aresta(f,h). aresta(h,g). adjacente(N, F) :- aresta(N, F) ; aresta(F, N). triangulo(X, Y, Z) :- adjacente(X,Y), adjacente(Y,Z). resolvido, têm a questão do espaço. Att
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now