summaryrefslogtreecommitdiffstats
path: root/third_party/python/ply/example/BASIC/powers.bas
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/python/ply/example/BASIC/powers.bas')
-rw-r--r--third_party/python/ply/example/BASIC/powers.bas13
1 files changed, 13 insertions, 0 deletions
diff --git a/third_party/python/ply/example/BASIC/powers.bas b/third_party/python/ply/example/BASIC/powers.bas
new file mode 100644
index 0000000000..a454dc3e21
--- /dev/null
+++ b/third_party/python/ply/example/BASIC/powers.bas
@@ -0,0 +1,13 @@
+5 PRINT "THIS PROGRAM COMPUTES AND PRINTS THE NTH POWERS"
+6 PRINT "OF THE NUMBERS LESS THAN OR EQUAL TO N FOR VARIOUS"
+7 PRINT "N FROM 1 THROUGH 7"
+8 PRINT
+10 FOR N = 1 TO 7
+15 PRINT "N = "N
+20 FOR I = 1 TO N
+30 PRINT I^N,
+40 NEXT I
+50 PRINT
+60 PRINT
+70 NEXT N
+80 END