Function reverse(s:string):string;
var s1:string;
i:integer;
begin
for i:=1 to length(s) do
s1:=s[i]+s1;
reverse:=s1;
end;
var s:string;
begin
readln(s);
s:=reverse(s);
writeln(s);
<span>end.</span>
Дима ниже Вася ещё ниже Игорь и ещё ниже Толя
Var A: Array of Integer;
N: Integer;
i: Integer;
sum: Integer;
Begin
Randomize;
Write('N = ');
ReadLn(N);
SetLength(A, N + 1);
WriteLn('Массив:');
For i := 1 To N Do
Begin
A[i] := Random(50) - 25;
Write(A[i] + ' ');
End;
WriteLn;
WriteLn('Без отрицательных:');
For i := 1 To N Do Begin
If A[i] >= 0 Then
Write(A[i] + ' ');
End;
sum := 0;
WriteLn;
WriteLn('Среднее арифметическое:');
For i := 1 To N Do Begin
sum := sum + A[i];
End;
WriteLn(sum / N);
<span>End.</span>
Program srednee;
var
x, y: integer;
sredn: real;
begin
write('x = '); readln(x);
write(' y = ');readln(y);
sredn := (power(x, 3) + power(y, 3)) / 2;
writeln('Srednee arifmeticheskoe = ', sredn);
writeln('X otlichayetsya na ',abs(sredn-x));
writeln('Y otlichayetsya na ',abs(sredn-y));
end.
Program primer;
var y, x: real;
begin
x:=1;
repeat
y:=x*x-16*x+32;
write(y)
x:=x+0.25;
until x < 10;
readln;
end.