N-queens problem: Difference between revisions
Content added Content deleted
(→{{header|Fortran}}: adding F77... could be optimized a bit, to be continued ;-)) |
(→Alternate Fortran 77 solution: + output) |
||
Line 1,148: | Line 1,148: | ||
===Alternate Fortran 77 solution=== |
===Alternate Fortran 77 solution=== |
||
⚫ | |||
<lang fortran> |
|||
⚫ | |||
C See the 2nd program for Scheme on the "Permutations" page for the main idea |
C See the 2nd program for Scheme on the "Permutations" page for the main idea |
||
program qtest |
program qtest |
||
Line 1,213: | Line 1,212: | ||
go to 10 |
go to 10 |
||
20 chk=.false. |
20 chk=.false. |
||
end |
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}}== |
=={{header|Haskell}}== |