aboutsummaryrefslogtreecommitdiff
path: root/Semestr 4/ask/lista 1/zad7.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Semestr 4/ask/lista 1/zad7.txt')
-rw-r--r--Semestr 4/ask/lista 1/zad7.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/Semestr 4/ask/lista 1/zad7.txt b/Semestr 4/ask/lista 1/zad7.txt
new file mode 100644
index 0000000..1e9c4b3
--- /dev/null
+++ b/Semestr 4/ask/lista 1/zad7.txt
@@ -0,0 +1,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 \ No newline at end of file