ответ на Python:
from random import randint
a = [[randint(10,90) for i in range(7)] for i in range(7)]
[print(*i) for i in a]
print('4:')
c = [[i for i in j] for j in a]
for i in range(1,6):
c[i][-i-1] = 99
c[2][5] = c[3][5] = c[4][5] = c[5][5] = c[5][2] = c[5][3] = c[5][4] = c[4][3] = c[4][4] = c[3][4] = 99
[print(*i) for i in c]
print('5:')
c = [[i for i in j] for j in a]
for i in range(7):
c[i][3] = c[3][i] = 99
c[1][2]=c[2][1]=c[2][2]=c[1][4]=c[2][4]=c[2][5]=c[4][4]=c[4][5]=c[5][4]=c[4][2]=c[4][1]=c[5][2]=99
[print(*i) for i in c]
Объяснение:
очень надеюсь что пробелы будут
Var
N,A:integer;
Begin
Write('N = ');Read(N);
A:=0;
While N>0 do
Begin
if (N mod 10) > A then A:= N mod 10;
N:=N div 10;
End;
Write(A)
End.
Var
N,A,B:integer;
C:boolean;
Begin
Write('N = ');Read(N);
A:=-1;
B:=-2;
C:=false;
While N>0 do
Begin
if A=B then C:=true;
if N>0 then
Begin
A:=N mod 10;
N:=N div 10;
End;
if A=B then C:=true;
if N>0 then
Begin
B:=N mod 10;
N:=N div 10;
End;
End;
if A=B then C:=true;
if C then Write('Есть')
else Write('Нет')
End.