写出下列程序运行结果
1.var
i,a,b,c,d:integer;
f:array[0..3] of integer;
begin
for i:=0 to 3 do
read(f[i]);
a := f[0] + f[1] + f[2] + f[3];
a := a div f[0];
b := f[0] + f[2] + f[3];
b := b div a;
c := (b * f[1] + a) div f[2];
d := f[(b div c) mod 4];
if (f[(a + b + c + d) mod 4] > f[2]) then begin
a := a + b;
writeln(a);
end else
begin
c := c + d;
writeln(c);
end;
end.
输入30 20 10 5
输出74
2.VAR a:ARRAY [1..4] OF Char;
C,Ch :Char;
BEGIN
FOR Ch:='W' TO 'Z' DO
a[Ord(Ch)-Ord('W')+1]:=Ch;
FOR Ch:='W' TO 'Z' DO
BEGIN
FOR C:=Ch TO 'Z' DO
Write(a[Ord(C)一Ord('W')+1];
Writeln
END
END.
输出 WXYZ
XYZ
YZ
Z
3.VAR
a,b:Integer;
PROCEDURE P(C:Integer:VAR d:Integer);
BEGIN
C:=a+b;
d:=a-b;
END;
BEGIN
a:=1;
b:=2;
P(a,b);