Uses CRT;
Var TB : real;
BEGIN
clrscr;
repeat
begin
write('Moi ban nhap diem trung binh: ');
Readln(TB);
end;
until (TB>0) and (TB<10);
If (TB >= 8) then write('hoc luc gioi') else
If (TB>=6.5) then write('hoc luc kha') else
If (TB>5) then write('hoc luc trung binh') else
If (TB>3.5) then write('hoc luc yeu') else
write('hoc luc kem');
Readln;
END.
Uses CRT;
Var TB : real;
Begin
clrscr;
Readln(TB);
If TB >= 8 then write('hoc luc gioi') else
If 6.5<=TB<8 then write('hoc luc kha') else
If 5<=TB<6.5 then write('hoc luc trung binh') else
If 3.5<=TB<5 then write('hoc luc yeu') else
write('hoc luc kem');
Readln;
End.
program xep_loai_hoc_luc;
uses crt;
var TB: real;
begin
clrscr;
write ('nhap diem TB: '); readln (TB);
if TB >=8.0 then writeln ('hoc luc gioi')
else if (TB >=6.5) and (TB<8) then writeln ('hoc luc kha')
else if (TB>=5.0) and (TB <6.5) then writeln('hoc luc trung binh')
else if (TB>=3.5) and (TB<5.0) then writeln('hoc luc yeu');
readln
end.
program xep_loai_hoc_luc;
uses crt;
var TB: real;
begin
clrscr;
write ('nhap diem TB: '); readln (TB);
if TB >=8.0 then writeln ('hoc luc gioi')
else if (TB >=6.5) and (TB<8) then writeln ('hoc luc kha')
else if (TB>=5.0) and (TB <6.5) then writeln('hoc luc trung binh')
else if (TB>=3.5) and (TB<5.0) then writeln('hoc luc yeu')
else writeln('hoc luc kem');
readln
end.