Updated examples

java11^2
Sandy Brownlee 2 years ago
parent 461749e44a
commit 6a30c4db8b
  1. 8
      programs/bardemo.tri
  2. 22
      programs/while-longloop.tri

@ -9,7 +9,11 @@ in
b := 2;
putint(a);
puteol();
putint(b);
puteol();
putint(|a);
putint(|b)
end
puteol();
putint(|b);
puteol()
end

@ -0,0 +1,22 @@
let
var a : Integer;
var b : Integer;
var c : Integer
in
begin
put('1');
puteol();
a := 0;
while a < 5000 do
begin
b := 0;
while b < 3000 do
begin
c := c + a;
c := c / (1 + b);
b := b + 1;
end;
a := a + 1;
end;
putint(c);
end