1.
Program bai1;
uses crt;
var a,b,c: integer;
begin
clrscr;
write('nhap canh a ='); readln(a);
write('nhap canh b ='); readln(b);
write('nhap canh c ='); readln(c);
if (a+b<c) or (b+c<a) and (c+a <b) then
writeln('khong phai la 3 canh cua tam giac ') else
writeln('la 3 canh cua tam giac ');
readln;
end.
2.
program bai2;
uses crt;
var a: array [1..100] of integer;
i,n: integer;
tong: real;
begin
clrscr;
write('nhap n ='); readln(n);
for i := 1 to n do
begin
write('nhap a[',i,'] = '); readln(a[i]);
end;
tong:=0;
for i:= 1 to n do
if (a[i] mod 2 = 0 ) or ( a[i] mod 3 = 0) then
tong:=tong+a[i];
write('tong cac so chia het cho 2 hoac 3 = ' ,tong :4:2);
readln;
end.