progs/lexer/token.sc
changeset 729 b147a10be8dd
parent 725 f345e89895f5
child 827 67c8a6e6a305
--- a/progs/lexer/token.sc	Mon Jun 29 22:19:05 2020 +0100
+++ b/progs/lexer/token.sc	Mon Jun 29 22:43:43 2020 +0100
@@ -53,4 +53,52 @@
     println(f"$i%2.0f: ${time(tokenise(prog3 * i))._2}")
   }
 
-}
\ No newline at end of file
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// Primes program
+//================
+
+/*
+end := 100;
+n := 2;
+while (n < end) do {
+  f := 2;
+  tmp := 0;
+  while ((f < n / 2 + 1) && (tmp == 0)) do {
+    if ((n / f) * f == n) then  { tmp := 1 } else { skip };
+    f := f + 1
+  };
+  if (tmp == 0) then { write(n) } else { skip };
+  n  := n + 1
+}
+*/
+
+// Factors program
+//=================
+
+/*
+write "Input n please";
+read n;
+write "The factors of n are";
+f := 2;
+while n != 1 do {
+    while (n / f) * f == n do {
+        write f;
+        n := n / f
+    };
+    f := f + 1
+}
+*/
\ No newline at end of file