1) const n=10; var a:array[1..n]of integer; i:integer; begin for i:=1 to n do read(a[i]); writeln; for i:=1 to n do write(a[i]:4); end.
2) var a:array[1..1000]of real; i,n:integer; begin writeln('n ?'); readln(n); for i:=1 to n do begin writeln('INPUT ',i,' элемент'); readln(a[i]); end; writeln; for i:=1 to n do write(a[i]:4:2); end. 3) var a:array[1..1000]of real; i,n:integer; begin writeln('n ?'); readln(n); for i:=1 to n do begin a[i]:=random; write(a[i]:4:2); end; writeln; end.
1) const n=10; var a:array[1..n]of integer; i,k:integer; begin for i:=1 to n do begin readln(a[i]);;; if a[i]mod 5=0 then k:=k+1; end; writeln; writeln(k); end.
2) const n=10; var a:array[1..n]of integer; i,S:integer; begin for i:=1 to n do begin a[i]:=random(21)-10; write(a[i]:4); if (abs(a[i]mod 10)=3) then S:=S+a[i]; end; writeln; writeln(S); end.
const
n=10;
var
a:array[1..n]of integer;
i:integer;
begin
for i:=1 to n do
read(a[i]);
writeln;
for i:=1 to n do
write(a[i]:4);
end.
2)
var
a:array[1..1000]of real;
i,n:integer;
begin
writeln('n ?');
readln(n);
for i:=1 to n do
begin
writeln('INPUT ',i,' элемент');
readln(a[i]);
end;
writeln;
for i:=1 to n do
write(a[i]:4:2);
end.
3)
var
a:array[1..1000]of real;
i,n:integer;
begin
writeln('n ?');
readln(n);
for i:=1 to n do
begin
a[i]:=random;
write(a[i]:4:2);
end;
writeln;
end.
const
n=10;
var
a:array[1..n]of integer;
i,k:integer;
begin
for i:=1 to n do
begin
readln(a[i]);;;
if a[i]mod 5=0 then
k:=k+1;
end;
writeln;
writeln(k);
end.
2)
const
n=10;
var
a:array[1..n]of integer;
i,S:integer;
begin
for i:=1 to n do
begin
a[i]:=random(21)-10;
write(a[i]:4);
if (abs(a[i]mod 10)=3) then
S:=S+a[i];
end;
writeln;
writeln(S);
end.