i am using strawberry compiler. i have even tried it on several other PCs , same result....
the error number i receive is error 16 which according to strawberry's official website it is because of a prefix notation which i have none....
after downloading strawberry prolog compiler , extract the downloaded file and run prolog.exe , create a new file and paste code , then press F5 to run .
still didn't make any difference :
have i done it write ?
writeN(N, X) :-
forall(between(1, N, _I), write(X)).
cross(N) :-
hor_line(N),
N1 is N - 1,
B1 is N1 // 2,
Middle is N1 + B1,
down(N,’*’,0,N1),
down(N,’.’,N1,B1),
blanks(1), blanks(Middle), stars(1), nl,
up(N,’.’,Middle,B1)...
every time i run the following code :
:- use_module(contestlib, [writeN/2]).
cross(N) :-
hor_line(N),
N1 is N - 1,
B1 is N1 // 2,
Middle is N1 + B1,
down(N,’*’,0,N1),
down(N,’.’,N1,B1),
blanks(1), blanks(Middle), stars(1), nl,
up(N,’.’,Middle,B1),
up(N,’*’,N1,N1),
hor_line(N).
hor_line(N) :-...
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.