1.
Program HOC24;
var i,n: integer;
t,t1: longint;
begin
t:=0; t1:=1;
for i:=1 to n do
begin
if i mod 2=0 then t:=t+i;
if i mod 3=0 then t1:=t1*i;
end;
writeln('Tong cac so chan tu 1 den 100 la : ',t);
write('Tich cac cho chia het cho 3 tu 1 den 100 la : ',t1);
readln
end.
2.
Program HOC24;
var i,n: integer;
t: longint;
begin
t:=0;
for i:=1 to n do
if (i mod 2=0) and (i mod 3=0) then t:=t+i;
writeln('Tong cac so chan tu 1 den 100 chia het cho 3 la : ',t);
readln
end.