1:
uses crt;
var a,b:integer;
begin
clrscr;
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
if (a>0) and (b>0) then writeln('Cung dau');
if (a<0) and (b<0) then writeln('Cung dau');
if (a>0) and (b<0) then writeln('Khac dau');
if (a<0) and (b>0) then writeln('Khac dau');
readln;
end.
2:
uses crt;
var n,i,d,t,x,y:integer;
st:string;
begin
clrscr;;
repeat
write('Nhap n='); readln(n);
until (100<=n) and (n<=999);
str(n,st);
d:=length(st);
t:=0;
for i:=1 to d do
begin
val(st[i],x,y);
if x mod 2=1 then t:=t+x;
end;
writeln('Tong cac chu so le cua ',n,' la: ',t);
readln;
end.