N-queens problem: Difference between revisions

Content added Content deleted
(Convert <lang> elements to <syntaxhighlight>)
(missed some <lang> elements)
Line 4,664: Line 4,664:
=={{header|EasyLang}}==
=={{header|EasyLang}}==


<lang>subr show_sol
<syntaxhighlight>subr show_sol
print "Solution " & n_sol
print "Solution " & n_sol
print ""
print ""
Line 5,209: Line 5,209:


=={{header|ERRE}}==
=={{header|ERRE}}==
<syntaxhighlight>
<lang>
!------------------------------------------------
!------------------------------------------------
! QUEENS.R : solve queens problem on a NxN board
! QUEENS.R : solve queens problem on a NxN board
Line 5,345: Line 5,345:
The output:
The output:


<syntaxhighlight>
<lang>
| | | |X| | | | | |
| | | |X| | | | | |
| |X| | | | | | | |
| |X| | | | | | | |
Line 14,734: Line 14,734:
=={{header|Scilab}}==
=={{header|Scilab}}==
Naive brute-force search.
Naive brute-force search.
<lang>//Length of board side
<syntaxhighlight>//Length of board side
Board_size = 8;
Board_size = 8;


Line 16,574: Line 16,574:
(either by XSLT processors saxon-6.5.5, xsltproc, xalan,
(either by XSLT processors saxon-6.5.5, xsltproc, xalan,
or any of the big5 browsers):
or any of the big5 browsers):
<syntaxhighlight>
<lang>
15863724
15863724
16837425
16837425