aboutsummaryrefslogtreecommitdiff
path: root/Semestr 4/ask/lista 1/zad7.txt
blob: 1e9c4b37bba491d7a574dcd2480b334eb8163034 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
        I := 0
        goto ITest
ILoop:  J := I
        goto WTest
WLoop:  t1 := 4 * J
        Temp := arr[t1]
        t2 := J - 1        
        t3 := 4 * t2
        arr[t1] := arr[t3]
        arr[t3] := Temp
        J := J - 1
WTest:  if J <= 0 goto IPlus
        t4 := 4 * J
        t5 := arr[t4]
        t6 := J - 1
        t7 = 4 * t6
        t8 := arr[t7]
        if t5 >= t8 goto IPlus
        goto WLoop 
IPlus:  I := I + 1
ITest:  if I < length goto ILoop