gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
move samples to 'alpha-mj' subfolder
[mjc2wsl.git] / samples / alpha-mj / ArrayTest.mj
diff --git a/samples/alpha-mj/ArrayTest.mj b/samples/alpha-mj/ArrayTest.mj
new file mode 100644 (file)
index 0000000..c55ffd1
--- /dev/null
@@ -0,0 +1,20 @@
+program ArrayTest
+       int[] arr;
+       int i;
+       int max;
+{
+       void main(){
+               max = 10;
+               arr = new int[max];
+               i = 0;
+               while (i<max){
+                       arr[i] = max-i;
+                       i++;
+               }
+               i = 0;
+               while (i<len(arr)){
+                       print(arr[i],3);
+                       i++;
+               }
+       }
+}
\ No newline at end of file
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner