Skip to content

Commit 697c680

Browse files
committed
[dana] Fix N_Queens program and result
1 parent b759465 commit 697c680

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

dana/programs/N_Queens.dana

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ def main
1919
j_pb := j_pb + 1
2020
writeString: "\n"
2121
i_pb := i_pb + 1
22-
writeString: "\n"
2322

2423
def isSafe is byte: board_param as byte[][], row_param col_param n_param as int
2524
var i_is j_is is int
@@ -97,7 +96,7 @@ def main
9796
else :
9897
writeString: "No solution exists.\n"
9998

100-
writeString: "Enter board size: "
99+
# writeString: "Enter board size: "
101100
size_main := readInteger()
102101
if size_main > 20 :
103102
writeString: "Warning: Board size capped at 20 due to program limits.\n"

dana/programs/N_Queens.result

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
Q . . . . . . .
2-
. . . . . . Q .
3-
. . . . Q . . .
4-
. . . Q . . . .
5-
. . Q . . . . .
6-
. Q . . . . . .
7-
. . . . . Q . .
8-
. . . . . . . Q
9-
10-
Solution found.
1+
Q . . . . . . .
2+
. . . . Q . . .
3+
. . . . . . . Q
4+
. . . . . Q . .
5+
. . Q . . . . .
6+
. . . . . . Q .
7+
. Q . . . . . .
8+
. . . Q . . . .

0 commit comments

Comments
 (0)