Câu a:
Program cau_a;
uses crt;
var a,b:integer;
begin
clrscr;
for a:=1 to 18 do
begin
b:=18-a;
if a-b=2 then
write('so thu nhat la:',a,'so thu hai la:',b);
end;
readln;
end.
Câu b:
program cau_c;
uses crt;
var p,q:integer;
begin
clrscr;
for p:= 1 to 20 do
begin
q:= 20-p;
if p=3*q then
writeln('so thu nhst la:',p,'so thu hai la:',q);
end;
readln;
end.