2)
Program Massiv1;
var a:array[1..10] of real;
i:integer;
s:real;
begin
clrscr;
write('Введите элементы массива: ');
s:=0;
for i :=1 to 10 do
readln(a[i]);
if (a[i]>0) then s:=s+1;
end;
writeln;
for i :=1 to 10 do writeln(a[i]:3:3);
writeln('Количество положительных элементов:',s);
readkey;
end.
3)
Program Massiv2;
var a:array[1..10] of integer;
i,b:integer;
b:=2;
a[i]=i+b;
b:=b+1;
write(a[i]:2);
2)
Program Massiv1;
var a:array[1..10] of real;
i:integer;
s:real;
begin
clrscr;
write('Введите элементы массива: ');
s:=0;
for i :=1 to 10 do
begin
readln(a[i]);
if (a[i]>0) then s:=s+1;
end;
writeln;
for i :=1 to 10 do writeln(a[i]:3:3);
writeln('Количество положительных элементов:',s);
readkey;
end.
3)
Program Massiv2;
var a:array[1..10] of integer;
i,b:integer;
begin
clrscr;
b:=2;
for i :=1 to 10 do
begin
a[i]=i+b;
b:=b+1;
write(a[i]:2);
end;
readkey;
end.