diff options
Diffstat (limited to 'spec/inputs/goto.mp')
-rw-r--r-- | spec/inputs/goto.mp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/inputs/goto.mp b/spec/inputs/goto.mp index 3410ca3..1197251 100644 --- a/spec/inputs/goto.mp +++ b/spec/inputs/goto.mp | |||
@@ -7,7 +7,7 @@ do | |||
7 | ::done:: | 7 | ::done:: |
8 | 8 | ||
9 | do | 9 | do |
10 | for z = 1, 10 for y = 1, 10 for x = 1, 10 | 10 | for z = 1, 10 do for y = 1, 10 do for x = 1, 10 |
11 | if x^2 + y^2 == z^2 | 11 | if x^2 + y^2 == z^2 |
12 | print 'found a Pythagorean triple:', x, y, z | 12 | print 'found a Pythagorean triple:', x, y, z |
13 | goto done | 13 | goto done |
@@ -15,7 +15,7 @@ do | |||
15 | 15 | ||
16 | do | 16 | do |
17 | for z = 1, 10 | 17 | for z = 1, 10 |
18 | for y = 1, 10 for x = 1, 10 | 18 | for y = 1, 10 do for x = 1, 10 |
19 | if x^2 + y^2 == z^2 | 19 | if x^2 + y^2 == z^2 |
20 | print 'found a Pythagorean triple:', x, y, z | 20 | print 'found a Pythagorean triple:', x, y, z |
21 | print 'now trying next z...' | 21 | print 'now trying next z...' |
@@ -24,7 +24,7 @@ do | |||
24 | 24 | ||
25 | do | 25 | do |
26 | ::redo:: | 26 | ::redo:: |
27 | for x = 1, 10 for y = 1, 10 | 27 | for x = 1, 10 do for y = 1, 10 |
28 | if not f x, y then goto continue | 28 | if not f x, y then goto continue |
29 | if not g x, y then goto skip | 29 | if not g x, y then goto skip |
30 | if not h x, y then goto redo | 30 | if not h x, y then goto redo |