aboutsummaryrefslogtreecommitdiff
path: root/projects/10/test/Main.jack
diff options
context:
space:
mode:
authorYuchen Pei <me@ypei.me>2018-01-20 15:41:49 +0100
committerYuchen Pei <me@ypei.me>2018-01-20 15:41:49 +0100
commitd3a0cc3a8ba6dfeb64d3faeffdeb6845b60e5840 (patch)
treed58df9ec2480e2a9ec6240f9c797f83d1a0b1056 /projects/10/test/Main.jack
parent3571f998b28fbc8d9250ba04c983935f10a16c15 (diff)
rearranged the dir for github
- removed tools and pdfs - rearranged the projects dirs - added md files - other minor changes
Diffstat (limited to 'projects/10/test/Main.jack')
-rw-r--r--projects/10/test/Main.jack30
1 files changed, 0 insertions, 30 deletions
diff --git a/projects/10/test/Main.jack b/projects/10/test/Main.jack
deleted file mode 100644
index cd80644..0000000
--- a/projects/10/test/Main.jack
+++ /dev/null
@@ -1,30 +0,0 @@
-class Main {
- function void main() {
- var Array a;
- var int length;
- var int i, sum;
-
- let length = Keyboard.readInt("HOW MANY NUMBERS? ");
- let a = Array.new(length);
- let i = 0;
-
- while (i < length) {
- let a[i] = Keyboard.readInt("ENTER THE NEXT NUMBER: ");
- let i = i + 1;
- }
-
- let i = 0;
- let sum = 0;
-
- while (i < length) {
- let sum = sum + a[i];
- let i = i + 1;
- }
-
- do Output.printString("THE AVERAGE IS: ");
- do Output.printInt(sum / length);
- do Output.println();
-
- return;
- }
-}