câu 6:
uses crt;
var x: byte;
t: string;
begin
clrscr;
write ('nhap x (1<x<9): '); readln (x);
if x=2 then t:='thu hai';
if x=3 then t:='thu ba';
if x=4 then t:='thu tu';
if x=5 then t:='thu nam';
if x=6 then t:='thu sau';
if x=7 then t:='thu bay';
if x=8 then t:='chu nhat';
if (x<>2) and (x<>3) and (x<>4) and (x<>5) and (x<>6) and (x<>7) and (x<>8) then
begin
writeln ('ban da nhap khong hop le');
readln;
exit;
end;
writeln (t);
readln;
end.
câu 7:
uses crt;
var a,b: integer;
begin
clrscr;
write ('nhap a: '); readln (a);
write ('nhap b: '); readln (b);
writeln ('tong la: ',a+b);
writeln ('hieu la: ',a-b);
writeln ('tich la: ',a*b);
writeln ('thuong la: ',a/b:1:2);
readln;
end.