Program bai1;
uses crt;
var a,b,c: integer;
s: longint;
begin
clrscr;
write('nhap so nguyen 1 = '); readln(a);
write('nhap so nguyen 2 = '); readln(b);
write('nhap so nguyen 3 = '); readln(c);
s:=a+b+c;
if (s mod 3 = 0 ) and (s mod 5 = 0 ) then
writeln('tong 3 chu so a b c chia het cho 3 va 5') else
writeln('tong 3 chu so a b c khong chia het cho 3 va 5');
readln;
end.
program baitap;
uses crt;
var a,c,b,s:integer;
begin
clrscr;
write('nhap so thu nhat: ');
readln(a);
write('nhap so thu hai: ');
readln(b);
write('nhap so thu ba: ');
readln(c);
write(a:4,b:4,c:4);{xuat ra 3 so vua nhap}
writeln;
S:= a+b+c;
if S mod 5=0 then
writeln('tong ba so chia het cho 5')
else if S mod 3 = 0 then
writeln('tong ba so chia het cho 3');
readln;
end.