N-queens problem: Difference between revisions
→Alternate Fortran 77 solution: + output
(→{{header|Fortran}}: adding F77... could be optimized a bit, to be continued ;-)) |
(→Alternate Fortran 77 solution: + output) |
||
Line 1,148:
===Alternate Fortran 77 solution===
<lang fortran>C This one enumerates permutations, skipping impossible "branches"▼
▲C This one enumerates permutations, skipping impossible "branches"
C See the 2nd program for Scheme on the "Permutations" page for the main idea
program qtest
Line 1,213 ⟶ 1,212:
go to 10
20 chk=.false.
end
C Output
C 1 1
C 2 0
C 3 0
C 4 2
C 5 10
C 6 4
C 7 40
C 8 92
C 9 352
C 10 724
C 11 2680
C 12 14200
C 13 73712
C 14 365596
C 15 2279184
C 16 14772512</lang>
=={{header|Haskell}}==
|