Program egor_sasha; var num_eg, num_sash,pri,pri1: real; var mes_eg,mes_sash: real; beginwriteln('numer egora'); readln(num_eg); writeln('numer sashi'); readln(num_sash); writeln('mesto egora (verkh=1,vniz=0)'); readln(mes_eg); writeln('mesto sashi (verkh=1,vniz=0)'); readln(mes_sash); pri: =num_sash+1; pri1: =num_eg+1; if num_eg=pri then writeln('yes') else writeln('no'); if num_sash=pri1 then writeln('yes') else writeln('no'); if mes_eg=1 then writeln('egor-high')else writeln('egor-low'); if mes_sash=1 then writeln('sasha-high')else writeln('sasha-low'); end.
var
s: string;
i, count: integer;
begin
writeln('Vvedite stroky: ');
readln(s);
for i := 1 to length(s) - 2 do
if copy(s, i, 3) = 'abc' then
count := count + 1;
writeln('Kol-vo: ', count);
end.
2.
var
s1, s2: string;
i, len1, len2: integer;
begin
writeln('Vvedite stroky 1: ');
readln(s1);
writeln('Vvedite stroky 2: ');
readln(s2);
len1 := length(s1);
len2 := length(s2);
if len1 > len2 then writeln('1 stroka dlinnee')
else if len1 < len2 then writeln('2 stroka dlinnee')
else writeln('dlini strok ravnie')
end.
3.
var
s1, s2, s3: string;
begin
writeln('Vvedite stroky 1: ');
readln(s1);
writeln('Vvedite stroky 2: ');
readln(s2);
s3 := s1[1] + s1[2] + s2[1] + s2[2];
writeln('Novaja stroka: ', s3);
end.