gitweb on Svarog
projekti pod git sistemom za održavanje verzija -- projects under the git version control system
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a2b3153)
raw | patch | inline | side by side (parent: a2b3153)
author | Doni Pracner <quinnuendo@gmail.com> | |
Sun, 19 Jan 2014 21:37:12 +0000 (22:37 +0100) | ||
committer | Doni Pracner <quinnuendo@gmail.com> | |
Sun, 19 Jan 2014 21:37:12 +0000 (22:37 +0100) |
samples/ArraysTest.mj | [new file with mode: 0644] | patch | blob |
diff --git a/samples/ArraysTest.mj b/samples/ArraysTest.mj
--- /dev/null
+++ b/samples/ArraysTest.mj
@@ -0,0 +1,29 @@
+program ArraysTest
+{
+ void rek_arr(int i)
+ int[] a; int loc, loc2; {
+ if (i>1){
+ a = new int[i];
+ loc = 0;
+ loc2 = 1;
+ while (loc<i){
+ a[loc] = loc2;
+ loc++;
+ loc2 = loc2 * i;
+ }
+ rek_arr(i-1);
+ loc = 0;
+ while (loc<i){
+ print(a[loc],3);
+ loc++;
+ }
+ print(0,5);
+ }
+ }
+
+ void main() int max;
+ {
+ max = 5;
+ rek_arr(max);
+ }
+}
\ No newline at end of file