progs/loops.while
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Tue, 18 Oct 2016 20:39:54 +0100
changeset 456 2fddf8ab744f
parent 275 618c7640cf66
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
275
618c7640cf66 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 207
diff changeset
     1
start := 1000; 
93
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
x := start;
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
y := start;
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
z := start;
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
while 0 < x do {
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
 while 0 < y do {
148
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
     7
  while 0 < z do { z := z - 1 };
93
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
  z := start;
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
  y := y - 1
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
 };     
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
 y := start;
4794759139ea better organised
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
 x := x - 1
207
f824e1331fc6 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 182
diff changeset
    13
}
148
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 93
diff changeset
    14