1) program array;
var A : array[1..10000] of integer;
i:integer;
begin
for i:=1 to length(A) do begin
if i mod 3 = 0 then
A[i]:=A[i]*2;
end;
end.
-----------------------------------
2) program fff;
var A : array[1..100] of integer;
i,n:integer;
for i:=1 to n do begin
A[i]:=i;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
1) program array;
var A : array[1..10000] of integer;
i:integer;
begin
for i:=1 to length(A) do begin
if i mod 3 = 0 then
A[i]:=A[i]*2;
end;
end.
-----------------------------------
2) program fff;
var A : array[1..100] of integer;
i,n:integer;
begin
for i:=1 to n do begin
if i mod 3 = 0 then
A[i]:=i;
end;
end.