aboutsummaryrefslogtreecommitdiff
path: root/tests/ii/arithmetic/program.cps
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ii/arithmetic/program.cps')
-rw-r--r--tests/ii/arithmetic/program.cps12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ii/arithmetic/program.cps b/tests/ii/arithmetic/program.cps
new file mode 100644
index 0000000..7c4bf52
--- /dev/null
+++ b/tests/ii/arithmetic/program.cps
@@ -0,0 +1,12 @@
+DECLARE Count : INTEGER
+DECLARE Index : INTEGER
+DECLARE A : INTEGER
+DECLARE B : INTEGER
+DECLARE Small : INTEGER
+INPUT Count
+FOR Index <- 1 TO Count
+ INPUT A
+ INPUT B
+ Small <- A MOD 1000001
+ OUTPUT A < B, ":", A DIV B, ":", A MOD B, ":", Small + B, ":", Small - B, ":", Small * B
+NEXT Index