Вот задачи две. В третьей условия не понял и времени нет.
Code
program first;
uses crt;
type
XY = record
x: integer;
y: integer;
end;
var
aPoints: array[1..10] of XY;
i: integer;
Perim: real;
function Dlina(t1, t2: XY): real;
begin
dlina := sqrt(sqr(t2.x - t1.x) + sqr(t2.y - t1.y));
end;
begin
clrscr;
{vvod dannih}
writeln('Vvedite koord vershin');
for i := 1 to 10 do
readln(aPoints[i].x, apoints[i].y);
{vichislyaem Perimetr}
for i := 1 to 9 do
Perim := Perim + dlina(aPoints[i], aPoints[i+1]);
Perim := Perim + dlina(aPoints[1], aPoints[10]);
writeln('Perimetr: ', Perim:2:4);
readkey;
end.
Code
program Forum_2;
uses crt;
var
S: string;
i: integer;
begin
clrscr;
writeln('Vvedite stroku: ');
readln(S);
if (UpCase(S[1]) = 'A') then S[1] := '?';
if (UpCase(S[1]) in ['B'..'Z']) then S[1] := 'a';
for i := 2 to length(s) do
begin
if s[i - 1] = ' ' then
if s[i] = 'a' then s[i] := '?' else s[i] := 'a';
end;
writeln(S);
readkey;
end.