// PascalABC.NET 3.1, сборка 1171 от 15.02.2016
var
n,d1,d2,d3:integer;
begin
Write('n='); Read(n);
d1:=n div 100; d3:= n mod 10;
d2:=(n div 10) mod 10;
if (d1=d2) or (d1=d3) or (d2=d3) then Writeln('Да')
else Writeln('Нет')
end.
<u><em>Тестовые решения:</em></u>
n=123
Нет
n=121
Да
n=222
Да
Нарисовано будет прямой угол по команде вниз(на 5 единиц) -влево(на 5 единиц)
Program Massif;
const n=4; m=3;
var
a:array [1..n,1..m] of integer;
i,j:integer;
begin
for i:=1 to n do
for j:=1 to m do
begin
write('a[',i,',',j,']=');
Readln(a[i,j]);
a[i,j]:=sqr(a[i,j]);
end;
for i:=1 to n do begin
for j:=1 to m do write(a[i,j]:4);
writeln;
end;
end.
Python code:
1)
<span>print("Zadacha 1")
x = float(input("Vvedite x"))
if x >= 0:
y = 7 * x - 3
print(y)
else:
y = 2 * (x * x * x)
2)
<span>print("Zadacha 2")
a = float(input("Vvedite result pervogo"))
b = float(input("Vvedite result vtorogo"))
c = float(input("Vvedite result tretego"))
if (a > b) and (a > c):
print(a)
if (b > a) and (b > c):
print(b)
if (c > a) and (c > b):
print(c)
3)
print("Zadacha nomer 3")
b = float(input("Vedite B"))
if b > 3:
b = b - 5
print(b)
else:
b = 2 * b
print(b)</span></span>