1)
var X:array[12] of real;
i: integer;
begin
for i:=1 to 12 do
readln(X[i]);
X[i]:=X[i]-23;
end;
writeln(X[i])
end.
2)
var M:array[100] of integer;
for i:=1 to 100 do begin
readln(M[i]);
if(M[i] mod 2=0) then M[i]:=M[i]*M[i]
else M[i]=2*M[i];
for i:=1 to 100 do
writeln(M[i]);
3)
var price:array[20] of real;
i:integer;
minprice:real;
minprice:=10000;
for i:=1 to 20 do
readln(price[i]);
if (price[i]<minprice) then minprice:=price[i];
writeln(minprice)
4)
i, counter: integer;
readln(M[1]);
counter:=0;
for i:=2 to 100 do begin
if ((M[i] mod 2=1) and (M[i-1] mod 2=1)) then inc(counter);
writeln(counter)
private static void Main() { int[] array = {2,2,2,3,4,4,6,6,6,6};
for (var i = 0; i < array.Length; i++) Console.Write($"{array[i]} "); Console.WriteLine();
var counter = 0; for (var i = 0; i < array.Length - 1; i+=2) if (array[i] % 2 == 0 && array[i + 1] % 2 == 0) counter++;
Console.WriteLine($"Количество четных пар чисел в массиве: {counter}"); }
1)
var X:array[12] of real;
i: integer;
begin
for i:=1 to 12 do
begin
readln(X[i]);
X[i]:=X[i]-23;
end;
for i:=1 to 12 do
writeln(X[i])
end.
2)
var M:array[100] of integer;
i: integer;
begin
for i:=1 to 100 do begin
readln(M[i]);
if(M[i] mod 2=0) then M[i]:=M[i]*M[i]
else M[i]=2*M[i];
end;
for i:=1 to 100 do
writeln(M[i]);
end.
3)
var price:array[20] of real;
i:integer;
minprice:real;
begin
minprice:=10000;
for i:=1 to 20 do
begin
readln(price[i]);
if (price[i]<minprice) then minprice:=price[i];
end;
writeln(minprice)
end.
4)
var M:array[100] of integer;
i, counter: integer;
begin
readln(M[1]);
counter:=0;
for i:=2 to 100 do begin
readln(M[i]);
if ((M[i] mod 2=1) and (M[i-1] mod 2=1)) then inc(counter);
end;
writeln(counter)
end.