Const z = 50;
var A:Array[1..z,1..z] of integer;
n,i,j:integer;
begin
write('Введите размер массива ');
readln(n);
for i:=1 to n do
beginfor j:=1 to n do
begin
A[i,j]:= random(100)-50;
write(A[i,j]:4);
end;
writeln;
end;
writeln;writeln;
for i:=1 to n do
beginfor j:=1 to n do
begin
if i=j then
A[i,j]:=0;
write(A[i,j]:4);
end;
writeln;
end;end.<span>
</span>
1)
Program asd;
USES crt;
Const n=10;
Var A:array[1..n] of integer;
i,kp,s:integer;
BEGIN
Writeln('Массив: ');
For i:=1 to n do
begin
A[i]:=Random(20);
Write(A[i]:4);
end;
Writeln;
For i:=1 to n do
begin
If A[i] mod 3=0 then
s:=s+1;
end;
Writeln('Сумма: ' ,s);
<span>END.
2)
Program asd;
USES crt;
Const n=10;
Var A:array[1..n] of integer;
i,kp,s:integer;
BEGIN
Writeln('Массив: ');
For i:=1 to n do
begin
A[i]:=Random(20)-10;
Write(A[i]:4);
end;
Writeln;
For i:=1 to n do
begin
If A[i]<0 then s:=s+1;
end;
If s=0 then Writeln('Нет отр. элементов!');
Writeln('Сумма отр. элементов: ' ,s);
<span>END.</span></span>
import math
def a(): # задача А
x = float(input('x = '))
y = float(input('y = '))
if x <= 2 and y <= x and 4 <= (x * x + y * y):
print('Yes!')
else:
print('No!')
a()
def b(): # задача Б
x = float(input('x = '))
y = float(input('y = '))
if (x >= 0) and (x <= math.pi) and (y <= math.sin(x)) and (y <= 0.5):
print('Yes!')
else:
print('No!')
b()
def c(): # задача В
x = float(input('x = '))
y = float(input('y = '))
if (y <= (2 - x * x)) and ((y >= x) or (x >= 0)):
print('Yes!')
else:
print('No!')
c()