Câu 6:
uses crt;
var a:integer;
begin
clrscr;
write('Nhap a='); readln(a);
if a mod 2=0 then writeln(a,' la so chan')
else writeln(a,' la so le');
readln;
end.
Câu 7:
uses crt;
var a,b:integer;
begin
clrscr;
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
if a>b then writeln(a-b)
else writeln(b-a);
readln;
end.
Câu 8:
uses crt;
var a,b,c,ln:integer;
begin
clrscr;
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
write('Nhap c='); readln(c);
ln:=a;
if ln<b then ln:=b;
if ln<c then ln:=c;
writeln(ln);
readln;
end.
Câu 10:
uses crt;
var toan,ly,hoa,dtb:real;
begin
clrscr;
write('Nhap diem Toan:'); readln(toan);
write('Nhap diem Ly:'); readln(ly);
write('Nhap diem Hoa:'); readln(hoa);
dtb:=(toan*2+ly+hoa)/4;
if dtb<5 then writeln('Yeu');
if (5<=dtb) and (dtb<8) then writeln('Kha');
if dtb>=8 then
begin
if (toan=10) and (hoa>7) and (ly>7) then writeln('Gioi va nhan hoc bong')
else writeln('Gioi va khong nhan hoc bong');
end;
readln;
end.