-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest9.pm
More file actions
58 lines (52 loc) · 910 Bytes
/
test9.pm
File metadata and controls
58 lines (52 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
program test9;
const two = 2;
type
s = array[1..10] of integer;
t = record f, g:integer end;
var
a:integer; b, c:S; d, e:T;
procedure writebool(x:boolean);
begin
if x then write(1) else write(0)
end;
procedure echoone;
begin
read(a);
write(a)
end;
procedure p(u:integer; var v:integer);
var x:integer;
begin
echoone;
write(u);
v:=3; write(a);
x:=4; write(x)
end;
procedure q;
begin
write(5)
end;
begin
write(0);
p(two, a);
q;
b[10] := 6; c:= b; write(c[10]);
d.g := 7; e:= d; write(e.g);
write(-8); write(8+1);
write(11-1); write (22 div 2);
write (6*2); write (27 mod 14);
writebool(not false);
writebool(false and true);
writebool(false or true);
writebool(1<2); writebool(1=2);
writebool(1>2); writebool(1<=2);
writebool(1<>2); writebool(1>=2);
if true then write(14);
if false then write(0) else write(15);
a:=16;
while a<=17 do
begin
write(a);
a:=a+1;
end
end.