4. program bai_4;
ues crt;
var
s,n,i:integer;
begin
clrscr;
write('nhap n:');readln(n);
s:=0;
for i:=1 to n do
if i (mod 2=0) then s:=s+1;
write('tong la:',s:7);
readln;
end.
5.program bai_5;
uses crt;
var
i,s,n:integer;
begin
clrscr;
write('nhap n :');readln(n);
s:=0;
for i:=1 to n do s:=s+1;
writer('tong la:',s);
readln;
end.
8.program bai_8;
uses crt;
var
A:=array[1..100]of integer;
i,n,max:integer;
begin
clrscr;
write('nhap n=');readln(n);
for i:= 1 to n do
begin
write('A[',i,']=');readln(A[i]);
end;
for i:= 1 to n do write(A[i],' ');
max:=a[1];
for i:= 1 to n do
if a[i] mod> max then:=a[i];
write('gia tri lon nhat trong mang la:',max);
readln;
end.
6.
var S,i:integer;
begin
S:=0;
i:=0;
while s<=1000 do
begin
i:=i+1;
s:=s*i;
end;
write(; so i nho nhat de tich >1000 la ', n);
write('tich dau tien >1000 la', s);
end.