Определите, что будет напечатано в результате выполнения следующего алгоритма, записанного на паскале. var x, y,z: integer; begin x: =16; y: =21; x: =x-y; if x begin y: =2*y+x; z: =y-x end else z: =x-y; writeln(z) end
CLS RANDOMIZE TIMER INPUT "K = ", K INPUT "L = ", L DIM X!(K, L) FOR i = 1 TO K FOR j = 1 TO L X(i, j) = RND * 21 - 10 PRINT USING "###"; X(i, j); PRINT ; " "; NEXT j PRINT NEXT i FOR i = 1 TO L * 4 - 1 PRINT ; "_"; NEXT i PRINT FOR N = 1 TO L FOR i = 1 TO L - N - 1 IF X(i, 2) < X(i + 1, 2) THEN B = X(i, 2) X(i, 2) = X(i + 1, 2) X(i + 1, 2) = B END IF NEXT i NEXT N
FOR i = 1 TO K FOR j = 1 TO L PRINT USING "###"; X(i, j); PRINT " "; NEXT j PRINT NEXT i END
var t:real;
begin
t:=ArcTan(Sqrt(1-x*x)/x);
if x<0 then ArcCos:=t+Pi
else ArcCos:=t
end;
var
a,b,c,p,p2,s,alpha,beta,gamma,h:real;
begin
Read(a,b,p);
c:=p-a-b;
p2:=p/2;
s:=sqrt(p2*(p2-a)*(p2-b)*(p2-c));
alpha:=ArcCos((b*b+c*c-a*a)/(2*b*c));
beta:=ArcCos((a*a+c*c-b*b)/(2*a*c));
h:=a*Sin(beta);
alpha:=alpha*180/Pi;
beta:=beta*180/Pi;
gamma:=180-alpha-beta;
Writeln('c=',c);
Writeln('alpha=',alpha:0:2,', beta=',beta:0:2,', gamma=',gamma:0:2);
Writeln('S=',s,', h=',h)
end.
CLS
RANDOMIZE TIMER
INPUT "K = ", K
INPUT "L = ", L
DIM X!(K, L)
FOR i = 1 TO K
FOR j = 1 TO L
X(i, j) = RND * 21 - 10
PRINT USING "###"; X(i, j);
PRINT ; " ";
NEXT j
PRINT
NEXT i
FOR i = 1 TO L * 4 - 1
PRINT ; "_";
NEXT i
PRINT
FOR N = 1 TO L
FOR i = 1 TO L - N - 1
IF X(i, 2) < X(i + 1, 2) THEN
B = X(i, 2)
X(i, 2) = X(i + 1, 2)
X(i + 1, 2) = B
END IF
NEXT i
NEXT N
FOR i = 1 TO K
FOR j = 1 TO L
PRINT USING "###"; X(i, j);
PRINT " ";
NEXT j
PRINT
NEXT i
END