Vb
1.
Dim a(10) As Integer
Dim max, ind As Integer
max = 0
ind = -1
For i As Integer = 0 To 10
If a(i) > max Then
max = a(i)
ind = i
End If
Next
4.
Dim a(N) As Integer
Dim count As Integer = 0
For i As Integer = 1 To N Step 2
If Not (a(i) Mod 2) = 0 Then
count += 1
End If
Next
Pascal.
1.
const n=20;
var
a: array[1..n] of byte;
i,imax: byte;
begin
writeln('Исходный массив:');
for i:=1 to n do
begin
a[i]:=random(21);
write(a[i],' ');
end;
writeln;
imax:=1;
for i:=2 to n do
begin
if a[i] end;
writeln('Минимум = ',a[imin],', позиция: ',imin);
end.
4.
uses crt;
const n = 10;
var c: array [1..n] of integer;
i,sum,k: integer;
begin
clrscr;
randomize;
writeln('Исходный массив C: ');
for i:=1 to n do
begin
c[i]:=random(10)-3;
write(c[i]:3);
if odd(i) then
if odd(c[i]) then sum:=sum+1;
if c[i]<1 then
<br> inc(k);
end;
writeln;
writeln('количество нечетных элементов на нечетных местах: ',sum,', элементов <1 : ',k);
readln;
end.</span>