gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
mjc2wsl - use the proper start action right away in the action system generation
[mjc2wsl.git] / samples / ArraysTest.mj
1 program ArraysTest
2 {
3 void rek_arr(int i)
4 int[] a; int loc, loc2; {
5 if (i>1){
6 a = new int[i];
7 loc = 0;
8 loc2 = 1;
9 while (loc<i){
10 a[loc] = loc2;
11 loc++;
12 loc2 = loc2 * i;
13 }
14 rek_arr(i-1);
15 loc = 0;
16 while (loc<i){
17 print(a[loc],3);
18 loc++;
19 }
20 print(0,5);
21 }
22 }
24 void main() int max;
25 {
26 max = 5;
27 rek_arr(max);
28 }
29 }
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner