var
x1,y1,x2,y2:integer;
begin
readln(x1);
readln(y1);
readln(x2);
readln(y2);
if (x1+y1+x2+y2) mod 2 = 0 then
writeln('ONI IMEUT ODINAKOVIJ ZVET');
else
writeln('ONI IMEUT RAZNIJ ZVET');
end.
1.
var
n,i,k,sum,g:integer;
begin
readln(n);
g:=n;
while n<>0 do begin
g:= g div 10;
k +=1;
end;
for i:=1 to k do begin
g:= n mod 10;
sum:= sum + g;
n:=n div 10;
end;
if sum> 10 then
writeln('верно')
else
('неверно');
end.
2.
var
n,i,k,p,h,g:integer;
begin
readln(n);
g:=n;
while n<>0 do begin
g:= g div 10;
k +=1;
end;
p:=n mod 10;
n:=n div 10;
for i:=1 to k-1do begin
g:= n mod 10;
if g = p then
h += 1;
n:=n div 10;
end;
writeln(h);
end.
3.
const
n=10;
var
a:array[1..n]of integer;
i,sum:integer;
begin
a[n]:=0;
for i:=1 to 9 do
readln(a[i]);
for i:=1 to n do
sum:=sum+a[i];
writeln(sum);
end.
4.
var
n:integer;
begin
readln(n);
while n<>0 do begin
n:=n div 10;
k += 1;
end;
if k = 4 then
writeln('число четырехзначное')
else
writeln('число не четырехзначное');
end.
5.
var
a:array[1..10]of integer;
i:byte;
begin
for i:=1 to 10 do
readln(a[i]);
for i:=1 to 10 do begin
if a[i] = 2 then
writeln('да есть');
break;
end;
end.
Var n,m: integer;
<span>begin
</span><span> write('число: '); readln(n);
</span><span> m:=1;
</span><span> repeat
</span><span> m:=m shl 1;
</span><span> until m>=n;
</span><span> if m=n then writeln('True')
</span><span> else writeln('False')
</span><span>end.
</span><span>
</span>
3)
var
i: integer;
s: string;
begin
readln(s);
i := 1;
while (s[i] <> ':') do
begin
write(s[i]);
i := i + 1;
end;
end.
4)
var
i: integer;
s: string;
begin
readln(s);
i := 1;
while i < s.Length do
begin
if(s[i] = ' ') then s[i] := '.';
if(s.Length - i > 2) then if(s[i] = '.') and (s[i + 1] = '.') and (s[i + 2] = '.') then begin
delete(s, i + 1, 2);
end;
if(s.Length - i > 2) and (i > 2) then if(s[i - 1] = '.') and (s[i] = '.') and (s[i + 1] = '.') then
begin
delete(s, i + 1, 2);
end;
i := i + 1;
end;
writeln(s);
end.
//PascalABC.NET 3.0
function check(x: integer): boolean;
begin
var tmp := x * x;
Result := true;
repeat
if tmp mod 10 <> x mod 10 then Result := false;
tmp := tmp div 10;
x := x div 10;
until (x = 0) or not(Result);
end;
begin
var n := ReadInteger('Введите N:');
Range(1, n).Where(x -> check(x)).Select(x -> x.ToString + '*' + x.ToString + '=' + (x * x).ToString).Println(NewLine)
e<span>nd.</span>