summaryrefslogtreecommitdiff
path: root/data/test13.c
diff options
context:
space:
mode:
authorLizzy Hunt <elizabeth.hunt@simponic.xyz>2023-04-10 09:17:11 -0600
committerLizzy Hunt <elizabeth.hunt@simponic.xyz>2023-04-10 09:17:11 -0600
commit5f28f80c4e25a56cd444914c2f0b3da5e7fdb088 (patch)
tree600ad8b1ec5aad5155baf8c0352281054a8e6366 /data/test13.c
downloadcminus-5f28f80c4e25a56cd444914c2f0b3da5e7fdb088.tar.gz
cminus-5f28f80c4e25a56cd444914c2f0b3da5e7fdb088.zip
Initial commit - building
Diffstat (limited to 'data/test13.c')
-rw-r--r--data/test13.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/data/test13.c b/data/test13.c
new file mode 100644
index 0000000..c1a5c72
--- /dev/null
+++ b/data/test13.c
@@ -0,0 +1,23 @@
+void main() {
+ int a[10];
+ int i;
+
+ println("This should print 0, 2, 2, 3, 6 and 36");
+ a[0] = 0;
+ println(a[0]);
+ a[2] = 2;
+ println(a[2]);
+
+ i = 2;
+ a[i] = i;
+ println(a[i]);
+
+ i = 0;
+ while (i < 10) {
+ a[i] = i;
+ i = i + 1;
+ }
+ println(a[3]);
+ println(a[6]);
+ println(a[6]*6);
+}