Program ex16;
var
a,b,x,z,alpha:real;
begin
Write('a,b=');
Read(a,b);
x:=(a+b)/2;
z:=(1+x)/(1+(1+x)/x);
alpha:=a*x*x-cos(b*x)+z/2;
Writeln('x=',x,' z=',z,' alpha=',alpha)
end.
Контрольное решение
Turbo Pascal Version 7.0 Copyright (c) 1983,92 Borland International
a,b=0.58 -2.4
x=-9.1000000000E-01 z= 9.9878048780E-02 alpha= 1.1057274246E+00
Program massivy;
var array1: array [1..10] of integer;
i, b:integer;
begin
for i:=1 to 10 do
array1[i]:=random(-10, 10);
for i:=1 to 4 do begin
for b:=1 to 4 do
if array1[b] > array1[b+1] then
swap(array1[b], array1[b+1]);
end;
for i:=5 to 9 do begin
for b:=5 to 9 do
if array1[b] < array1[b+1] then
swap(array1[b], array1[b+1]);
end;
for i:=1 to 10 do
writeln(array1[i]);
end.