program Project1; uses crt; var a:array[1..100] of integer; n, i:integer; begin clrscr; write(‘Nhap vao so phan tu co trong day:=’); readln(n); for i:=1 to n do begin write(‘Nhap vao phan tu thu ‘,i,’ :=’); readln(A[i]); end; for i:=1 to n do writeln(A[i]); readln; end.
uses crt;
var a: array[1..100] of integer;
i,n,d1,d,j: integer;
begin
clrscr;
write (‘nhap n: ‘); readln (n);
for i:=1 to n do
begin
d1:=0
write (‘nhap phan tu thu ‘,i,’: ‘); readln (a[i]);
for j:=1 to a[i] do if a[i] mod i=0 then d1:=d1+1;
if d1=2 then d:=d+1;
end;
write (‘trong mang co ‘,d,’ so nguyen to’);
readln;
end.
program Project1;
uses crt;
var
a:array[1..100] of integer;
n, i:integer;
begin
clrscr;
write(‘Nhap vao so phan tu co trong day:=’); readln(n);
for i:=1 to n do
begin
write(‘Nhap vao phan tu thu ‘,i,’ :=’); readln(A[i]);
end;
for i:=1 to n do
writeln(A[i]);
readln;
end.